Skip to content

Commit

Permalink
Update HTTP Response For Not Allowed Requests (#199)
Browse files Browse the repository at this point in the history
* add type to handle response message

Signed-off-by: Jordan Dubrick <[email protected]>

* add put/post/delete endpoints and responses

Signed-off-by: Jordan Dubrick <[email protected]>

* add new endpoint handling for post/put/delete

Signed-off-by: Jordan Dubrick <[email protected]>

* add unit tests for new endpoint handlers

Signed-off-by: Jordan Dubrick <[email protected]>

* break down response into function

Signed-off-by: Jordan Dubrick <[email protected]>

* update codecoverage to exclude generated code

Signed-off-by: Jordan Dubrick <[email protected]>

---------

Signed-off-by: Jordan Dubrick <[email protected]>
  • Loading branch information
Jdubrick authored Feb 20, 2024
1 parent 19c1c08 commit 6d9b196
Show file tree
Hide file tree
Showing 7 changed files with 1,911 additions and 104 deletions.
1 change: 1 addition & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ coverage:
- "vendor/*"
- "Makefile"
- ".travis.yml"
- "**/*.gen.go"

# See http://docs.codecov.io/docs/pull-request-comments-1
comment:
Expand Down
10 changes: 10 additions & 0 deletions index/server/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,13 @@ type HealthResponse struct {
Message string `json:"message"`
}
}

// Method used is not supported.
//
// swagger:response methodNotAllowedResponse
type MethodNotAllowedResponse struct {
// in: body
Payload struct {
Message string `json:"message"`
}
}
Loading

0 comments on commit 6d9b196

Please sign in to comment.