From 53542fefd57bae3c92075209647ac7ecd3ea0fc7 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 27 May 2024 21:09:04 +0200 Subject: [PATCH] api: swagger: Network: add Peers Add documentation for the Peers field. Signed-off-by: Sebastiaan van Stijn --- api/swagger.yaml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index ef76b3e412587..29c645c59da7f 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -2206,7 +2206,7 @@ definitions: The name of the driver used to create the network (e.g. `bridge`, `overlay`). type: "string" - example: "bridge" + example: "overlay" EnableIPv6: description: | Whether the network was created with IPv6 enabled. @@ -2278,6 +2278,15 @@ definitions: example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" + Peers: + description: | + List of peer nodes for an overlay network. This field is only present + for overlay networks, and omitted for other network types. + type: "array" + items: + $ref: "#/definitions/PeerInfo" + x-nullable: true + # TODO: Add Services (only present when "verbose" is set). ConfigReference: description: | @@ -2355,6 +2364,22 @@ definitions: type: "string" example: "" + PeerInfo: + description: | + PeerInfo represents one peer of an overlay network. + type: "object" + properties: + Name: + description: + ID of the peer-node in the Swarm cluster. + type: "string" + example: "6869d7c1732b" + IP: + description: + IP-address of the peer-node in the Swarm cluster. + type: "string" + example: "10.133.77.91" + BuildInfo: type: "object" properties: