fix(httputil): rename error body field platformCode → platform_code (#2)
errorBody() map key corrected from "platformCode" to "platform_code" to match the OpenAPI spec snake_case convention. All HTTP error responses produced by Error(w, err) now emit "platform_code" in the JSON body. PR.md added to .gitignore. Depends on xerrors v1.0.2 (go.mod bumped in follow-up commit after xerrors tag). Reviewed-on: #2 Co-authored-by: Rene Nochebuena Guerrero <rene@nochebuena.dev> Co-committed-by: Rene Nochebuena Guerrero <rene@nochebuena.dev>
This commit was merged in pull request #2.
This commit is contained in:
2
go.sum
2
go.sum
@@ -2,6 +2,8 @@ code.nochebuena.dev/go/valid v1.0.1 h1:8O7uW8ufPk8lZ2EvKmTJpIrp9WsNjRg/KqMTxeTAT
|
||||
code.nochebuena.dev/go/valid v1.0.1/go.mod h1:tSZiKc/108a1hGUnKe/dCg+TfM9HPcrdhZyW4VgCLjU=
|
||||
code.nochebuena.dev/go/xerrors v1.0.1 h1:fgXoabY/ZwxAzaM1sKFf3sbL7ZHWyDxItB/rdbnl0mo=
|
||||
code.nochebuena.dev/go/xerrors v1.0.1/go.mod h1:03MMVfrhaf4XmTMgMrEUFCmuZPGHUCKDitiQvwCuwvY=
|
||||
code.nochebuena.dev/go/xerrors v1.0.2 h1:PHkn9RXJdvz5fm3n1TCLo2qCzBqBfnQj5/4oF0nEWyk=
|
||||
code.nochebuena.dev/go/xerrors v1.0.2/go.mod h1:03MMVfrhaf4XmTMgMrEUFCmuZPGHUCKDitiQvwCuwvY=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw=
|
||||
|
||||
Reference in New Issue
Block a user