Skip to content

Commit

Permalink
Add 409 response to swagger godoc
Browse files Browse the repository at this point in the history
When attempting to create a network with a name that already exists,
a 409 status code will be returned

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <[email protected]>
  • Loading branch information
jwhonce authored and mheon committed Feb 16, 2022
1 parent a34f279 commit 975d79a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/api/server/register_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// $ref: "#/responses/NetworkCreateReport"
// 400:
// $ref: "#/responses/BadParamError"
// 409:
// $ref: "#/responses/ConflictError"
// 500:
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/networks/create"), s.APIHandler(libpod.CreateNetwork)).Methods(http.MethodPost)
Expand Down

0 comments on commit 975d79a

Please sign in to comment.