From 29ddf2214dc2b696b39a35012f93d9cf2ea6e339 Mon Sep 17 00:00:00 2001 From: Philipp Fruck Date: Tue, 24 Oct 2023 17:49:06 +0200 Subject: [PATCH] docs(API): Add reason to network connect 403 The 403 error might not only be raised in swarm operations. It is also returned when the given container is already connected to the network and is currently running. I noticed this when during the following PR: https://github.com/containers/podman/pull/20365 Signed-off-by: Philipp Fruck --- api/swagger.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 3c3d83fb9a..e6543bf181 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -10084,6 +10084,7 @@ paths: /networks/{id}/connect: post: summary: "Connect a container to a network" + description: "The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container" operationId: "NetworkConnect" consumes: - "application/json" @@ -10095,7 +10096,7 @@ paths: schema: $ref: "#/definitions/ErrorResponse" 403: - description: "Operation not supported for swarm scoped networks" + description: "Operation forbidden" schema: $ref: "#/definitions/ErrorResponse" 404: