Skip to content

Commit

Permalink
fix(openapi): change post return code status
Browse files Browse the repository at this point in the history
  • Loading branch information
jplanckeel authored Aug 1, 2022
2 parents e077585 + 0f3d6ca commit 30471ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/services.PrescalingEventOutput"
}
Expand Down
6 changes: 3 additions & 3 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/services.PrescalingEventOutput"
}
Expand Down Expand Up @@ -323,4 +323,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ paths:
produces:
- application/json
responses:
"200":
description: OK
"201":
description: Created
schema:
$ref: '#/definitions/services.PrescalingEventOutput'
"500":
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (s *Server) Initialize() error {
router := mux.NewRouter()

router.PathPrefix("/swagger/").Handler(httpSwagger.Handler(
httpSwagger.URL("http://localhost:9101/swagger/doc.json"), //The url pointing to API definition
httpSwagger.URL("doc.json"), //The url pointing to API definition
httpSwagger.DeepLinking(true),
httpSwagger.DocExpansion("none"),
httpSwagger.DomID("swagger-ui"),
Expand Down

0 comments on commit 30471ec

Please sign in to comment.