diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 73ea1a378c..c5b79ed65c 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -1496,10 +1496,23 @@ definitions: type: "string" progressDetail: $ref: "#/definitions/ProgressDetail" + aux: + $ref: "#/definitions/ImageID" + + ImageID: + type: "object" + description: "Image ID or Digest" + properties: + ID: + type: "string" + example: + ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" CreateImageInfo: type: "object" properties: + id: + type: "string" error: type: "string" status: @@ -1532,9 +1545,9 @@ definitions: ProgressDetail: type: "object" properties: - code: + current: type: "integer" - message: + total: type: "integer" ErrorResponse: @@ -4489,6 +4502,8 @@ paths: description: "Container created successfully" schema: type: "object" + title: "ContainerCreateResponse" + description: "OK response to ContainerCreate operation" required: [Id, Warnings] properties: Id: @@ -4537,6 +4552,7 @@ paths: description: "no error" schema: type: "object" + title: "ContainerInspectResponse" properties: Id: description: "The ID of the container" @@ -4821,6 +4837,8 @@ paths: description: "no error" schema: type: "object" + title: "ContainerTopResponse" + description: "OK response to ContainerTop operation" properties: Titles: description: "The ps column titles" @@ -4981,6 +4999,8 @@ paths: items: type: "object" x-go-name: "ContainerChangeResponseItem" + title: "ContainerChangeResponseItem" + description: "change item in response to ContainerChanges operation" required: [Path, Kind] properties: Path: @@ -5359,6 +5379,8 @@ paths: description: "The container has been updated." schema: type: "object" + title: "ContainerUpdateResponse" + description: "OK response to ContainerUpdate operation" properties: Warnings: type: "array" @@ -5712,6 +5734,8 @@ paths: description: "The container has exit." schema: type: "object" + title: "ContainerWaitResponse" + description: "OK response to ContainerWait operation" required: [StatusCode] properties: StatusCode: @@ -5957,6 +5981,7 @@ paths: description: "No error" schema: type: "object" + title: "ContainerPruneResponse" properties: ContainersDeleted: description: "Container IDs that were deleted" @@ -6213,6 +6238,7 @@ paths: description: "No error" schema: type: "object" + title: "BuildPruneResponse" properties: SpaceReclaimed: description: "Disk space reclaimed in bytes" @@ -6398,6 +6424,8 @@ paths: items: type: "object" x-go-name: HistoryResponseItem + title: "HistoryResponseItem" + description: "individual image layer information in response to ImageHistory operation" required: [Id, Created, CreatedBy, Tags, Size, Comment] properties: Id: @@ -6604,6 +6632,7 @@ paths: type: "array" items: type: "object" + title: "ImageSearchResponseItem" properties: description: type: "string" @@ -6679,6 +6708,7 @@ paths: description: "No error" schema: type: "object" + title: "ImagePruneResponse" properties: ImagesDeleted: description: "Images that were deleted" @@ -6706,6 +6736,7 @@ paths: description: "An identity token was generated successfully." schema: type: "object" + title: "SystemAuthResponse" required: [Status] properties: Status: @@ -6760,6 +6791,7 @@ paths: description: "no error" schema: type: "object" + title: "SystemVersionResponse" properties: Platform: type: "object" @@ -6938,6 +6970,7 @@ paths: description: "no error" schema: type: "object" + title: "SystemEventsResponse" properties: Type: description: "The type of object emitting the event" @@ -7021,6 +7054,7 @@ paths: description: "no error" schema: type: "object" + title: "SystemDataUsageResponse" properties: LayersSize: type: "integer" @@ -7379,7 +7413,12 @@ paths: description: "No error" schema: type: "object" + title: "ExecInspectResponse" properties: + CanRemove: + type: "boolean" + DetachKeys: + type: "string" ID: type: "string" Running: @@ -7445,6 +7484,7 @@ paths: description: "Summary volume data that matches the query" schema: type: "object" + title: "VolumeListResponse" required: [Volumes, Warnings] properties: Volumes: @@ -7626,6 +7666,7 @@ paths: description: "No error" schema: type: "object" + title: "VolumePruneResponse" properties: VolumesDeleted: description: "Volumes that were deleted" @@ -7804,6 +7845,7 @@ paths: description: "No error" schema: type: "object" + title: "NetworkCreateResponse" properties: Id: description: "The ID of the created network." @@ -8006,6 +8048,7 @@ paths: description: "No error" schema: type: "object" + title: "NetworkPruneResponse" properties: NetworksDeleted: description: "Networks that were deleted" @@ -8057,6 +8100,7 @@ paths: items: description: "Describes a permission the user has to accept upon installing the plugin." type: "object" + title: "PluginPrivilegeItem" properties: Name: type: "string" @@ -8759,6 +8803,7 @@ paths: description: "no error" schema: type: "object" + title: "UnlockKeyResponse" properties: UnlockKey: description: "The swarm's unlock key." @@ -8850,6 +8895,7 @@ paths: description: "no error" schema: type: "object" + title: "ServiceCreateResponse" properties: ID: description: "The ID of the created service." @@ -9521,13 +9567,7 @@ paths: 201: description: "no error" schema: - type: "object" - properties: - ID: - description: "The ID of the created secret." - type: "string" - example: - ID: "ktnbjxoalbkvbvedmg1urrz8h" + $ref: "#/definitions/IdResponse" 409: description: "name conflicts with an existing object" schema: @@ -9726,13 +9766,7 @@ paths: 201: description: "no error" schema: - type: "object" - properties: - ID: - description: "The ID of the created config." - type: "string" - example: - ID: "ktnbjxoalbkvbvedmg1urrz8h" + $ref: "#/definitions/IdResponse" 409: description: "name conflicts with an existing object" schema: @@ -9878,6 +9912,7 @@ paths: schema: type: "object" x-go-name: DistributionInspect + title: "DistributionInspectResponse" required: [Descriptor, Platforms] properties: Descriptor: diff --git a/components/engine/api/templates/server/operation.gotmpl b/components/engine/api/templates/server/operation.gotmpl index 3ff63ef94c..8bed59d920 100644 --- a/components/engine/api/templates/server/operation.gotmpl +++ b/components/engine/api/templates/server/operation.gotmpl @@ -20,7 +20,7 @@ import ( {{ range .ExtraSchemas }} -// {{ .Name }} {{ template "docstring" . }} +// {{ .Name }} {{ comment .Description }} // swagger:model {{ .Name }} {{ template "schema" . }} {{ end }} diff --git a/components/engine/api/types/container/container_changes.go b/components/engine/api/types/container/container_changes.go index 767945a532..c909d6ca3e 100644 --- a/components/engine/api/types/container/container_changes.go +++ b/components/engine/api/types/container/container_changes.go @@ -7,7 +7,7 @@ package container // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- -// ContainerChangeResponseItem container change response item +// ContainerChangeResponseItem change item in response to ContainerChanges operation // swagger:model ContainerChangeResponseItem type ContainerChangeResponseItem struct { diff --git a/components/engine/api/types/container/container_create.go b/components/engine/api/types/container/container_create.go index c95023b814..49efa0f2c0 100644 --- a/components/engine/api/types/container/container_create.go +++ b/components/engine/api/types/container/container_create.go @@ -7,7 +7,7 @@ package container // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- -// ContainerCreateCreatedBody container create created body +// ContainerCreateCreatedBody OK response to ContainerCreate operation // swagger:model ContainerCreateCreatedBody type ContainerCreateCreatedBody struct { diff --git a/components/engine/api/types/container/container_top.go b/components/engine/api/types/container/container_top.go index 78bc37ee5e..ba41edcf3f 100644 --- a/components/engine/api/types/container/container_top.go +++ b/components/engine/api/types/container/container_top.go @@ -7,7 +7,7 @@ package container // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- -// ContainerTopOKBody container top o k body +// ContainerTopOKBody OK response to ContainerTop operation // swagger:model ContainerTopOKBody type ContainerTopOKBody struct { diff --git a/components/engine/api/types/container/container_update.go b/components/engine/api/types/container/container_update.go index 2339366fbd..7630ae54cd 100644 --- a/components/engine/api/types/container/container_update.go +++ b/components/engine/api/types/container/container_update.go @@ -7,7 +7,7 @@ package container // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- -// ContainerUpdateOKBody container update o k body +// ContainerUpdateOKBody OK response to ContainerUpdate operation // swagger:model ContainerUpdateOKBody type ContainerUpdateOKBody struct { diff --git a/components/engine/api/types/container/container_wait.go b/components/engine/api/types/container/container_wait.go index 47fb17578a..9e3910a6b4 100644 --- a/components/engine/api/types/container/container_wait.go +++ b/components/engine/api/types/container/container_wait.go @@ -15,7 +15,7 @@ type ContainerWaitOKBodyError struct { Message string `json:"Message,omitempty"` } -// ContainerWaitOKBody container wait o k body +// ContainerWaitOKBody OK response to ContainerWait operation // swagger:model ContainerWaitOKBody type ContainerWaitOKBody struct { diff --git a/components/engine/api/types/image/image_history.go b/components/engine/api/types/image/image_history.go index 0dd30c729a..d6b354bcdf 100644 --- a/components/engine/api/types/image/image_history.go +++ b/components/engine/api/types/image/image_history.go @@ -7,7 +7,7 @@ package image // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- -// HistoryResponseItem history response item +// HistoryResponseItem individual image layer information in response to ImageHistory operation // swagger:model HistoryResponseItem type HistoryResponseItem struct {