mirror of https://github.com/containers/podman.git
fix incorrect swagger doc for network dis/connect
The swagger api docs used the extra Body struct as part of the request which is wrong. We just want the plain type. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
4791595b5c
commit
46938bbf88
|
@ -55,15 +55,13 @@ type swagCompatNetworkCreateResponse struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Network disconnect
|
// Network disconnect
|
||||||
// swagger:model NetworkConnectRequest
|
// swagger:model NetworkCompatConnectRequest
|
||||||
type swagCompatNetworkConnectRequest struct {
|
type swagCompatNetworkConnectRequest struct {
|
||||||
// in:body
|
types.NetworkConnect
|
||||||
Body struct{ types.NetworkConnect }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Network disconnect
|
// Network disconnect
|
||||||
// swagger:model NetworkDisconnectRequest
|
// swagger:model NetworkCompatDisconnectRequest
|
||||||
type swagCompatNetworkDisconnectRequest struct {
|
type swagCompatNetworkDisconnectRequest struct {
|
||||||
// in:body
|
types.NetworkDisconnect
|
||||||
Body struct{ types.NetworkDisconnect }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,6 +133,12 @@ type swagNetworkPruneResponse struct {
|
||||||
Body []entities.NetworkPruneReport
|
Body []entities.NetworkPruneReport
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Network connect
|
||||||
|
// swagger:model NetworkConnectRequest
|
||||||
|
type swagNetworkConnectRequest struct {
|
||||||
|
entities.NetworkConnectOptions
|
||||||
|
}
|
||||||
|
|
||||||
func ServeSwagger(w http.ResponseWriter, r *http.Request) {
|
func ServeSwagger(w http.ResponseWriter, r *http.Request) {
|
||||||
path := DefaultPodmanSwaggerSpec
|
path := DefaultPodmanSwaggerSpec
|
||||||
if p, found := os.LookupEnv("PODMAN_SWAGGER_SPEC"); found {
|
if p, found := os.LookupEnv("PODMAN_SWAGGER_SPEC"); found {
|
||||||
|
|
|
@ -131,7 +131,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
||||||
// name: create
|
// name: create
|
||||||
// description: attributes for connecting a container to a network
|
// description: attributes for connecting a container to a network
|
||||||
// schema:
|
// schema:
|
||||||
// $ref: "#/definitions/NetworkConnectRequest"
|
// $ref: "#/definitions/NetworkCompatConnectRequest"
|
||||||
// responses:
|
// responses:
|
||||||
// 200:
|
// 200:
|
||||||
// description: OK
|
// description: OK
|
||||||
|
@ -159,7 +159,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
||||||
// name: create
|
// name: create
|
||||||
// description: attributes for disconnecting a container from a network
|
// description: attributes for disconnecting a container from a network
|
||||||
// schema:
|
// schema:
|
||||||
// $ref: "#/definitions/NetworkDisconnectRequest"
|
// $ref: "#/definitions/NetworkCompatDisconnectRequest"
|
||||||
// responses:
|
// responses:
|
||||||
// 200:
|
// 200:
|
||||||
// description: OK
|
// description: OK
|
||||||
|
@ -368,7 +368,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
|
||||||
// name: create
|
// name: create
|
||||||
// description: attributes for disconnecting a container from a network
|
// description: attributes for disconnecting a container from a network
|
||||||
// schema:
|
// schema:
|
||||||
// $ref: "#/definitions/NetworkDisconnectRequest"
|
// $ref: "#/definitions/NetworkCompatDisconnectRequest"
|
||||||
// responses:
|
// responses:
|
||||||
// 200:
|
// 200:
|
||||||
// description: OK
|
// description: OK
|
||||||
|
|
Loading…
Reference in New Issue