1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #35593 from ndeloof/master

Improve swagger schema for code generation
This commit is contained in:
Sebastiaan van Stijn 2018-01-08 12:17:56 +01:00 committed by GitHub
commit 16a1736b9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 43 additions and 21 deletions

View file

@ -4502,6 +4502,8 @@ paths:
description: "Container created successfully" description: "Container created successfully"
schema: schema:
type: "object" type: "object"
title: "ContainerCreateResponse"
description: "OK response to ContainerCreate operation"
required: [Id, Warnings] required: [Id, Warnings]
properties: properties:
Id: Id:
@ -4550,6 +4552,7 @@ paths:
description: "no error" description: "no error"
schema: schema:
type: "object" type: "object"
title: "ContainerInspectResponse"
properties: properties:
Id: Id:
description: "The ID of the container" description: "The ID of the container"
@ -4834,6 +4837,8 @@ paths:
description: "no error" description: "no error"
schema: schema:
type: "object" type: "object"
title: "ContainerTopResponse"
description: "OK response to ContainerTop operation"
properties: properties:
Titles: Titles:
description: "The ps column titles" description: "The ps column titles"
@ -4994,6 +4999,8 @@ paths:
items: items:
type: "object" type: "object"
x-go-name: "ContainerChangeResponseItem" x-go-name: "ContainerChangeResponseItem"
title: "ContainerChangeResponseItem"
description: "change item in response to ContainerChanges operation"
required: [Path, Kind] required: [Path, Kind]
properties: properties:
Path: Path:
@ -5372,6 +5379,8 @@ paths:
description: "The container has been updated." description: "The container has been updated."
schema: schema:
type: "object" type: "object"
title: "ContainerUpdateResponse"
description: "OK response to ContainerUpdate operation"
properties: properties:
Warnings: Warnings:
type: "array" type: "array"
@ -5725,6 +5734,8 @@ paths:
description: "The container has exit." description: "The container has exit."
schema: schema:
type: "object" type: "object"
title: "ContainerWaitResponse"
description: "OK response to ContainerWait operation"
required: [StatusCode] required: [StatusCode]
properties: properties:
StatusCode: StatusCode:
@ -5970,6 +5981,7 @@ paths:
description: "No error" description: "No error"
schema: schema:
type: "object" type: "object"
title: "ContainerPruneResponse"
properties: properties:
ContainersDeleted: ContainersDeleted:
description: "Container IDs that were deleted" description: "Container IDs that were deleted"
@ -6226,6 +6238,7 @@ paths:
description: "No error" description: "No error"
schema: schema:
type: "object" type: "object"
title: "BuildPruneResponse"
properties: properties:
SpaceReclaimed: SpaceReclaimed:
description: "Disk space reclaimed in bytes" description: "Disk space reclaimed in bytes"
@ -6411,6 +6424,8 @@ paths:
items: items:
type: "object" type: "object"
x-go-name: HistoryResponseItem x-go-name: HistoryResponseItem
title: "HistoryResponseItem"
description: "individual image layer information in response to ImageHistory operation"
required: [Id, Created, CreatedBy, Tags, Size, Comment] required: [Id, Created, CreatedBy, Tags, Size, Comment]
properties: properties:
Id: Id:
@ -6617,6 +6632,7 @@ paths:
type: "array" type: "array"
items: items:
type: "object" type: "object"
title: "ImageSearchResponseItem"
properties: properties:
description: description:
type: "string" type: "string"
@ -6692,6 +6708,7 @@ paths:
description: "No error" description: "No error"
schema: schema:
type: "object" type: "object"
title: "ImagePruneResponse"
properties: properties:
ImagesDeleted: ImagesDeleted:
description: "Images that were deleted" description: "Images that were deleted"
@ -6719,6 +6736,7 @@ paths:
description: "An identity token was generated successfully." description: "An identity token was generated successfully."
schema: schema:
type: "object" type: "object"
title: "SystemAuthResponse"
required: [Status] required: [Status]
properties: properties:
Status: Status:
@ -6773,6 +6791,7 @@ paths:
description: "no error" description: "no error"
schema: schema:
type: "object" type: "object"
title: "SystemVersionResponse"
properties: properties:
Platform: Platform:
type: "object" type: "object"
@ -6951,6 +6970,7 @@ paths:
description: "no error" description: "no error"
schema: schema:
type: "object" type: "object"
title: "SystemEventsResponse"
properties: properties:
Type: Type:
description: "The type of object emitting the event" description: "The type of object emitting the event"
@ -7034,6 +7054,7 @@ paths:
description: "no error" description: "no error"
schema: schema:
type: "object" type: "object"
title: "SystemDataUsageResponse"
properties: properties:
LayersSize: LayersSize:
type: "integer" type: "integer"
@ -7392,7 +7413,12 @@ paths:
description: "No error" description: "No error"
schema: schema:
type: "object" type: "object"
title: "ExecInspectResponse"
properties: properties:
CanRemove:
type: "boolean"
DetachKeys:
type: "string"
ID: ID:
type: "string" type: "string"
Running: Running:
@ -7458,6 +7484,7 @@ paths:
description: "Summary volume data that matches the query" description: "Summary volume data that matches the query"
schema: schema:
type: "object" type: "object"
title: "VolumeListResponse"
required: [Volumes, Warnings] required: [Volumes, Warnings]
properties: properties:
Volumes: Volumes:
@ -7639,6 +7666,7 @@ paths:
description: "No error" description: "No error"
schema: schema:
type: "object" type: "object"
title: "VolumePruneResponse"
properties: properties:
VolumesDeleted: VolumesDeleted:
description: "Volumes that were deleted" description: "Volumes that were deleted"
@ -7817,6 +7845,7 @@ paths:
description: "No error" description: "No error"
schema: schema:
type: "object" type: "object"
title: "NetworkCreateResponse"
properties: properties:
Id: Id:
description: "The ID of the created network." description: "The ID of the created network."
@ -8019,6 +8048,7 @@ paths:
description: "No error" description: "No error"
schema: schema:
type: "object" type: "object"
title: "NetworkPruneResponse"
properties: properties:
NetworksDeleted: NetworksDeleted:
description: "Networks that were deleted" description: "Networks that were deleted"
@ -8070,6 +8100,7 @@ paths:
items: items:
description: "Describes a permission the user has to accept upon installing the plugin." description: "Describes a permission the user has to accept upon installing the plugin."
type: "object" type: "object"
title: "PluginPrivilegeItem"
properties: properties:
Name: Name:
type: "string" type: "string"
@ -8772,6 +8803,7 @@ paths:
description: "no error" description: "no error"
schema: schema:
type: "object" type: "object"
title: "UnlockKeyResponse"
properties: properties:
UnlockKey: UnlockKey:
description: "The swarm's unlock key." description: "The swarm's unlock key."
@ -8863,6 +8895,7 @@ paths:
description: "no error" description: "no error"
schema: schema:
type: "object" type: "object"
title: "ServiceCreateResponse"
properties: properties:
ID: ID:
description: "The ID of the created service." description: "The ID of the created service."
@ -9534,13 +9567,7 @@ paths:
201: 201:
description: "no error" description: "no error"
schema: schema:
type: "object" $ref: "#/definitions/IdResponse"
properties:
ID:
description: "The ID of the created secret."
type: "string"
example:
ID: "ktnbjxoalbkvbvedmg1urrz8h"
409: 409:
description: "name conflicts with an existing object" description: "name conflicts with an existing object"
schema: schema:
@ -9739,13 +9766,7 @@ paths:
201: 201:
description: "no error" description: "no error"
schema: schema:
type: "object" $ref: "#/definitions/IdResponse"
properties:
ID:
description: "The ID of the created config."
type: "string"
example:
ID: "ktnbjxoalbkvbvedmg1urrz8h"
409: 409:
description: "name conflicts with an existing object" description: "name conflicts with an existing object"
schema: schema:
@ -9891,6 +9912,7 @@ paths:
schema: schema:
type: "object" type: "object"
x-go-name: DistributionInspect x-go-name: DistributionInspect
title: "DistributionInspectResponse"
required: [Descriptor, Platforms] required: [Descriptor, Platforms]
properties: properties:
Descriptor: Descriptor:

View file

@ -20,7 +20,7 @@ import (
{{ range .ExtraSchemas }} {{ range .ExtraSchemas }}
// {{ .Name }} {{ template "docstring" . }} // {{ .Name }} {{ comment .Description }}
// swagger:model {{ .Name }} // swagger:model {{ .Name }}
{{ template "schema" . }} {{ template "schema" . }}
{{ end }} {{ end }}

View file

@ -7,7 +7,7 @@ package container
// See hack/generate-swagger-api.sh // See hack/generate-swagger-api.sh
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ContainerChangeResponseItem container change response item // ContainerChangeResponseItem change item in response to ContainerChanges operation
// swagger:model ContainerChangeResponseItem // swagger:model ContainerChangeResponseItem
type ContainerChangeResponseItem struct { type ContainerChangeResponseItem struct {

View file

@ -7,7 +7,7 @@ package container
// See hack/generate-swagger-api.sh // See hack/generate-swagger-api.sh
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ContainerCreateCreatedBody container create created body // ContainerCreateCreatedBody OK response to ContainerCreate operation
// swagger:model ContainerCreateCreatedBody // swagger:model ContainerCreateCreatedBody
type ContainerCreateCreatedBody struct { type ContainerCreateCreatedBody struct {

View file

@ -7,7 +7,7 @@ package container
// See hack/generate-swagger-api.sh // See hack/generate-swagger-api.sh
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ContainerTopOKBody container top o k body // ContainerTopOKBody OK response to ContainerTop operation
// swagger:model ContainerTopOKBody // swagger:model ContainerTopOKBody
type ContainerTopOKBody struct { type ContainerTopOKBody struct {

View file

@ -7,7 +7,7 @@ package container
// See hack/generate-swagger-api.sh // See hack/generate-swagger-api.sh
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ContainerUpdateOKBody container update o k body // ContainerUpdateOKBody OK response to ContainerUpdate operation
// swagger:model ContainerUpdateOKBody // swagger:model ContainerUpdateOKBody
type ContainerUpdateOKBody struct { type ContainerUpdateOKBody struct {

View file

@ -15,7 +15,7 @@ type ContainerWaitOKBodyError struct {
Message string `json:"Message,omitempty"` Message string `json:"Message,omitempty"`
} }
// ContainerWaitOKBody container wait o k body // ContainerWaitOKBody OK response to ContainerWait operation
// swagger:model ContainerWaitOKBody // swagger:model ContainerWaitOKBody
type ContainerWaitOKBody struct { type ContainerWaitOKBody struct {

View file

@ -7,7 +7,7 @@ package image
// See hack/generate-swagger-api.sh // See hack/generate-swagger-api.sh
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// HistoryResponseItem history response item // HistoryResponseItem individual image layer information in response to ImageHistory operation
// swagger:model HistoryResponseItem // swagger:model HistoryResponseItem
type HistoryResponseItem struct { type HistoryResponseItem struct {