cleanup swagger API with multiple examples
@@ -3783,6 +3783,7 @@ definitions:
ServiceSpec:
description: "User modifiable configuration for a service."
+ type: object
properties:
Name:
description: "Name of the service."
@@ -5325,6 +5326,7 @@ definitions:
PeerNode:
description: "Represents a peer-node in the swarm"
+ type: "object"
properties:
NodeID:
description: "Unique identifier of for this node in the swarm."
@@ -7275,17 +7277,7 @@ paths:
400:
description: "Bad parameter"
schema:
- allOf:
- - $ref: "#/definitions/ErrorResponse"
- - type: "object"
- properties:
- message:
- description: |
- The error message. Either "must specify path parameter"
- (path cannot be empty) or "not a directory" (path was
- asserted to be a directory but exists as a file).
- type: "string"
- x-nullable: false
+ $ref: "#/definitions/ErrorResponse"
404:
description: "Container or path does not exist"
schema:
@@ -7320,17 +7312,7 @@ paths:
400:
description: "Bad parameter"
schema:
- allOf:
- - $ref: "#/definitions/ErrorResponse"
- - type: "object"
- properties:
- message:
- description: |
- The error message. Either "must specify path parameter"
- (path cannot be empty) or "not a directory" (path was
- asserted to be a directory but exists as a file).
- type: "string"
- x-nullable: false
+ $ref: "#/definitions/ErrorResponse"
404:
description: "Container or path does not exist"
schema:
@@ -7356,7 +7338,10 @@ paths:
tags: ["Container"]
put:
summary: "Extract an archive of files or folders to a directory in a container"
- description: "Upload a tar archive to be extracted to a path in the filesystem of container id."
+ description: |
+ Upload a tar archive to be extracted to a path in the filesystem of container id.
+ `path` parameter is asserted to be a directory. If it exists as a file, 400 error
+ will be returned with message "not a directory".
operationId: "PutContainerArchive"
consumes: ["application/x-tar", "application/octet-stream"]
responses:
@@ -7366,6 +7351,9 @@ paths:
description: "Bad parameter"
schema:
$ref: "#/definitions/ErrorResponse"
+ examples:
+ application/json:
+ message: "not a directory"
403:
description: "Permission denied, the volume or container rootfs is marked as read-only."
schema:
