summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/api/handlers/compat/swagger.go10
-rw-r--r--pkg/api/handlers/libpod/swagger.go6
-rw-r--r--pkg/api/server/register_networks.go6
3 files changed, 13 insertions, 9 deletions
diff --git a/pkg/api/handlers/compat/swagger.go b/pkg/api/handlers/compat/swagger.go
index cfbdd1154..32167d6b5 100644
--- a/pkg/api/handlers/compat/swagger.go
+++ b/pkg/api/handlers/compat/swagger.go
@@ -55,15 +55,13 @@ type swagCompatNetworkCreateResponse struct {
}
// Network disconnect
-// swagger:model NetworkConnectRequest
+// swagger:model NetworkCompatConnectRequest
type swagCompatNetworkConnectRequest struct {
- // in:body
- Body struct{ types.NetworkConnect }
+ types.NetworkConnect
}
// Network disconnect
-// swagger:model NetworkDisconnectRequest
+// swagger:model NetworkCompatDisconnectRequest
type swagCompatNetworkDisconnectRequest struct {
- // in:body
- Body struct{ types.NetworkDisconnect }
+ types.NetworkDisconnect
}
diff --git a/pkg/api/handlers/libpod/swagger.go b/pkg/api/handlers/libpod/swagger.go
index 7ccfdd0f3..8d7058b1e 100644
--- a/pkg/api/handlers/libpod/swagger.go
+++ b/pkg/api/handlers/libpod/swagger.go
@@ -133,6 +133,12 @@ type swagNetworkPruneResponse struct {
Body []entities.NetworkPruneReport
}
+// Network connect
+// swagger:model NetworkConnectRequest
+type swagNetworkConnectRequest struct {
+ entities.NetworkConnectOptions
+}
+
func ServeSwagger(w http.ResponseWriter, r *http.Request) {
path := DefaultPodmanSwaggerSpec
if p, found := os.LookupEnv("PODMAN_SWAGGER_SPEC"); found {
diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go
index 641bce333..344486299 100644
--- a/pkg/api/server/register_networks.go
+++ b/pkg/api/server/register_networks.go
@@ -131,7 +131,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for connecting a container to a network
// schema:
- // $ref: "#/definitions/NetworkConnectRequest"
+ // $ref: "#/definitions/NetworkCompatConnectRequest"
// responses:
// 200:
// description: OK
@@ -159,7 +159,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for disconnecting a container from a network
// schema:
- // $ref: "#/definitions/NetworkDisconnectRequest"
+ // $ref: "#/definitions/NetworkCompatDisconnectRequest"
// responses:
// 200:
// description: OK
@@ -368,7 +368,7 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error {
// name: create
// description: attributes for disconnecting a container from a network
// schema:
- // $ref: "#/definitions/NetworkDisconnectRequest"
+ // $ref: "#/definitions/NetworkCompatDisconnectRequest"
// responses:
// 200:
// description: OK