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:
$ref: "#/components/schemas/P2PUnderlay"
ethereum:
$ref: "#/components/schemas/EthereumAddress"
public_key:
publicKey:
$ref: "#/components/schemas/PublicKey"
pss_public_key:
pssPublicKey:
$ref: "#/components/schemas/PublicKey"
Balance:
......@@ -131,7 +131,7 @@ components:
ChequebookAddress:
type: object
properties:
chequebookaddress:
chequebookAddress:
$ref: "#/components/schemas/EthereumAddress"
DateTime:
......@@ -314,9 +314,9 @@ components:
Settlements:
type: object
properties:
totalreceived:
totalReceived:
type: integer
totalsent:
totalSent:
type: integer
settlements:
type: array
......@@ -410,7 +410,7 @@ components:
WelcomeMessage:
type: object
properties:
welcome_message:
welcomeMessage:
type: string
FeedType:
......
......@@ -44,7 +44,7 @@ type chequebookBalanceResponse struct {
}
type chequebookAddressResponse struct {
Address string `json:"chequebookaddress"`
Address string `json:"chequebookAddress"`
}
type chequebookLastChequePeerResponse struct {
......
......@@ -19,8 +19,8 @@ type addressesResponse struct {
Overlay swarm.Address `json:"overlay"`
Underlay []multiaddr.Multiaddr `json:"underlay"`
Ethereum common.Address `json:"ethereum"`
PublicKey string `json:"public_key"`
PSSPublicKey string `json:"pss_public_key"`
PublicKey string `json:"publicKey"`
PSSPublicKey string `json:"pssPublicKey"`
}
func (s *Service) addressesHandler(w http.ResponseWriter, r *http.Request) {
......
......@@ -27,8 +27,8 @@ type settlementResponse struct {
}
type settlementsResponse struct {
TotalSettlementReceived *big.Int `json:"totalreceived"`
TotalSettlementSent *big.Int `json:"totalsent"`
TotalSettlementReceived *big.Int `json:"totalReceived"`
TotalSettlementSent *big.Int `json:"totalSent"`
Settlements []settlementResponse `json:"settlements"`
}
......
......@@ -14,11 +14,11 @@ import (
const welcomeMessageMaxRequestSize = 512
type welcomeMessageRequest struct {
WelcomeMesssage string `json:"welcome_message"`
WelcomeMesssage string `json:"welcomeMessage"`
}
type welcomeMessageResponse struct {
WelcomeMesssage string `json:"welcome_message"`
WelcomeMesssage string `json:"welcomeMessage"`
}
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