Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 371d044

Browse files
hannsemanthaJeztah
authored andcommitted
Update service networks documentation
The previous description stated that an array of names / ids could be passed when the API in reality expects objects in the form of NetworkAttachmentConfig. This is fixed by updating the description and adding a definition for NetworkAttachmentConfig. Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se> (cherry picked from commit 4d09fab232ed282d020afbe1e0935b53379df4ad) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 37851d8f5bb7a86d8b393632ac00b7e6953ce5bf Component: engine
1 parent 53051b4 commit 371d044

1 file changed

Lines changed: 23 additions & 17 deletions

File tree

components/engine/api/swagger.yaml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3002,16 +3002,10 @@ definitions:
30023002
description: "Runtime is the type of runtime specified for the task executor."
30033003
type: "string"
30043004
Networks:
3005+
description: "Specifies which networks the service should attach to."
30053006
type: "array"
30063007
items:
3007-
type: "object"
3008-
properties:
3009-
Target:
3010-
type: "string"
3011-
Aliases:
3012-
type: "array"
3013-
items:
3014-
type: "string"
3008+
$ref: "#/definitions/NetworkAttachmentConfig"
30153009
LogDriver:
30163010
description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified."
30173011
type: "object"
@@ -3257,17 +3251,11 @@ definitions:
32573251
- "stop-first"
32583252
- "start-first"
32593253
Networks:
3260-
description: "Array of network names or IDs to attach the service to."
3254+
description: "Specifies which networks the service should attach to."
32613255
type: "array"
32623256
items:
3263-
type: "object"
3264-
properties:
3265-
Target:
3266-
type: "string"
3267-
Aliases:
3268-
type: "array"
3269-
items:
3270-
type: "string"
3257+
$ref: "#/definitions/NetworkAttachmentConfig"
3258+
32713259
EndpointSpec:
32723260
$ref: "#/definitions/EndpointSpec"
32733261

@@ -4439,6 +4427,24 @@ definitions:
44394427
IP address and ports at which this node can be reached.
44404428
type: "string"
44414429

4430+
NetworkAttachmentConfig:
4431+
description: "Specifies how a service should be attached to a particular network."
4432+
type: "object"
4433+
properties:
4434+
Target:
4435+
description: "The target network for attachment. Must be a network name or ID."
4436+
type: "string"
4437+
Aliases:
4438+
description: "Discoverable alternate names for the service on this network."
4439+
type: "array"
4440+
items:
4441+
type: "string"
4442+
DriverOpts:
4443+
description: "Driver attachment options for the network target"
4444+
type: "object"
4445+
additionalProperties:
4446+
type: "string"
4447+
44424448
paths:
44434449
/containers/json:
44444450
get:

0 commit comments

Comments
 (0)