Merge pull request #20468 from p-fruck/fix/api-compat-network-docs

[CI:DOCS] (API): Fix compat network (dis-)connect
This commit is contained in:
openshift-ci[bot] 2023-10-25 19:58:00 +00:00 committed by GitHub
commit 84efd2b7e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -28,6 +28,13 @@ type networkNotFound struct {
Body errorhandling.ErrorModel
}
// Network is already connected and container is running or transitioning to the running state ('initialized')
// swagger:response
type networkConnectedError struct {
// in:body
Body errorhandling.ErrorModel
}
// No such exec instance
// swagger:response
type execSessionNotFound struct {

View File

@ -125,7 +125,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// tags:
// - networks (compat)
// summary: Connect container to network
// description: Connect a container to a network. This endpoint is current a no-op
// description: Connect a container to a network
// produces:
// - application/json
// parameters:
@ -144,6 +144,8 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// description: OK
// 400:
// $ref: "#/responses/badParamError"
// 403:
// $ref: "#/responses/networkConnectedError"
// 500:
// $ref: "#/responses/internalError"
r.HandleFunc(VersionedPath("/networks/{name}/connect"), s.APIHandler(compat.Connect)).Methods(http.MethodPost)
@ -153,7 +155,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// tags:
// - networks (compat)
// summary: Disconnect container from network
// description: Disconnect a container from a network. This endpoint is current a no-op
// description: Disconnect a container from a network
// produces:
// - application/json
// parameters: