Commit 45ffe355 authored by Anatolie Lupacescu's avatar Anatolie Lupacescu Committed by GitHub

Using lower camel case for field names in http responses (#1613)

parent f5aa73f8
...@@ -29,9 +29,9 @@ components: ...@@ -29,9 +29,9 @@ components:
$ref: "#/components/schemas/P2PUnderlay" $ref: "#/components/schemas/P2PUnderlay"
ethereum: ethereum:
$ref: "#/components/schemas/EthereumAddress" $ref: "#/components/schemas/EthereumAddress"
public_key: publicKey:
$ref: "#/components/schemas/PublicKey" $ref: "#/components/schemas/PublicKey"
pss_public_key: pssPublicKey:
$ref: "#/components/schemas/PublicKey" $ref: "#/components/schemas/PublicKey"
Balance: Balance:
...@@ -131,7 +131,7 @@ components: ...@@ -131,7 +131,7 @@ components:
ChequebookAddress: ChequebookAddress:
type: object type: object
properties: properties:
chequebookaddress: chequebookAddress:
$ref: "#/components/schemas/EthereumAddress" $ref: "#/components/schemas/EthereumAddress"
DateTime: DateTime:
...@@ -314,9 +314,9 @@ components: ...@@ -314,9 +314,9 @@ components:
Settlements: Settlements:
type: object type: object
properties: properties:
totalreceived: totalReceived:
type: integer type: integer
totalsent: totalSent:
type: integer type: integer
settlements: settlements:
type: array type: array
...@@ -410,7 +410,7 @@ components: ...@@ -410,7 +410,7 @@ components:
WelcomeMessage: WelcomeMessage:
type: object type: object
properties: properties:
welcome_message: welcomeMessage:
type: string type: string
FeedType: FeedType:
......
...@@ -44,7 +44,7 @@ type chequebookBalanceResponse struct { ...@@ -44,7 +44,7 @@ type chequebookBalanceResponse struct {
} }
type chequebookAddressResponse struct { type chequebookAddressResponse struct {
Address string `json:"chequebookaddress"` Address string `json:"chequebookAddress"`
} }
type chequebookLastChequePeerResponse struct { type chequebookLastChequePeerResponse struct {
......
...@@ -19,8 +19,8 @@ type addressesResponse struct { ...@@ -19,8 +19,8 @@ type addressesResponse struct {
Overlay swarm.Address `json:"overlay"` Overlay swarm.Address `json:"overlay"`
Underlay []multiaddr.Multiaddr `json:"underlay"` Underlay []multiaddr.Multiaddr `json:"underlay"`
Ethereum common.Address `json:"ethereum"` Ethereum common.Address `json:"ethereum"`
PublicKey string `json:"public_key"` PublicKey string `json:"publicKey"`
PSSPublicKey string `json:"pss_public_key"` PSSPublicKey string `json:"pssPublicKey"`
} }
func (s *Service) addressesHandler(w http.ResponseWriter, r *http.Request) { func (s *Service) addressesHandler(w http.ResponseWriter, r *http.Request) {
......
...@@ -27,8 +27,8 @@ type settlementResponse struct { ...@@ -27,8 +27,8 @@ type settlementResponse struct {
} }
type settlementsResponse struct { type settlementsResponse struct {
TotalSettlementReceived *big.Int `json:"totalreceived"` TotalSettlementReceived *big.Int `json:"totalReceived"`
TotalSettlementSent *big.Int `json:"totalsent"` TotalSettlementSent *big.Int `json:"totalSent"`
Settlements []settlementResponse `json:"settlements"` Settlements []settlementResponse `json:"settlements"`
} }
......
...@@ -14,11 +14,11 @@ import ( ...@@ -14,11 +14,11 @@ import (
const welcomeMessageMaxRequestSize = 512 const welcomeMessageMaxRequestSize = 512
type welcomeMessageRequest struct { type welcomeMessageRequest struct {
WelcomeMesssage string `json:"welcome_message"` WelcomeMesssage string `json:"welcomeMessage"`
} }
type welcomeMessageResponse struct { type welcomeMessageResponse struct {
WelcomeMesssage string `json:"welcome_message"` WelcomeMesssage string `json:"welcomeMessage"`
} }
func (s *Service) getWelcomeMessageHandler(w http.ResponseWriter, r *http.Request) { func (s *Service) getWelcomeMessageHandler(w http.ResponseWriter, r *http.Request) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment