mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
api: swagger: move ContainerCreateResponse to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
64e96932bd
commit
ff197417fa
4 changed files with 41 additions and 40 deletions
|
@ -4617,6 +4617,26 @@ definitions:
|
||||||
Health:
|
Health:
|
||||||
$ref: "#/definitions/Health"
|
$ref: "#/definitions/Health"
|
||||||
|
|
||||||
|
ContainerCreateResponse:
|
||||||
|
description: "OK response to ContainerCreate operation"
|
||||||
|
type: "object"
|
||||||
|
title: "ContainerCreateResponse"
|
||||||
|
x-go-name: "ContainerCreateCreatedBody"
|
||||||
|
required: [Id, Warnings]
|
||||||
|
properties:
|
||||||
|
Id:
|
||||||
|
description: "The ID of the created container"
|
||||||
|
type: "string"
|
||||||
|
x-nullable: false
|
||||||
|
example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
|
||||||
|
Warnings:
|
||||||
|
description: "Warnings encountered when creating the container"
|
||||||
|
type: "array"
|
||||||
|
x-nullable: false
|
||||||
|
items:
|
||||||
|
type: "string"
|
||||||
|
example: []
|
||||||
|
|
||||||
ContainerWaitResponse:
|
ContainerWaitResponse:
|
||||||
description: "OK response to ContainerWait operation"
|
description: "OK response to ContainerWait operation"
|
||||||
type: "object"
|
type: "object"
|
||||||
|
@ -6081,25 +6101,7 @@ paths:
|
||||||
201:
|
201:
|
||||||
description: "Container created successfully"
|
description: "Container created successfully"
|
||||||
schema:
|
schema:
|
||||||
type: "object"
|
$ref: "#/definitions/ContainerCreateResponse"
|
||||||
title: "ContainerCreateResponse"
|
|
||||||
description: "OK response to ContainerCreate operation"
|
|
||||||
required: [Id, Warnings]
|
|
||||||
properties:
|
|
||||||
Id:
|
|
||||||
description: "The ID of the created container"
|
|
||||||
type: "string"
|
|
||||||
x-nullable: false
|
|
||||||
Warnings:
|
|
||||||
description: "Warnings encountered when creating the container"
|
|
||||||
type: "array"
|
|
||||||
x-nullable: false
|
|
||||||
items:
|
|
||||||
type: "string"
|
|
||||||
examples:
|
|
||||||
application/json:
|
|
||||||
Id: "e90e34656806"
|
|
||||||
Warnings: []
|
|
||||||
400:
|
400:
|
||||||
description: "bad parameter"
|
description: "bad parameter"
|
||||||
schema:
|
schema:
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
package container // import "github.com/docker/docker/api/types/container"
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Code generated by `swagger generate operation`. DO NOT EDIT.
|
|
||||||
//
|
|
||||||
// See hack/generate-swagger-api.sh
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// ContainerCreateCreatedBody OK response to ContainerCreate operation
|
|
||||||
// swagger:model ContainerCreateCreatedBody
|
|
||||||
type ContainerCreateCreatedBody struct {
|
|
||||||
|
|
||||||
// The ID of the created container
|
|
||||||
// Required: true
|
|
||||||
ID string `json:"Id"`
|
|
||||||
|
|
||||||
// Warnings encountered when creating the container
|
|
||||||
// Required: true
|
|
||||||
Warnings []string `json:"Warnings"`
|
|
||||||
}
|
|
19
api/types/container/container_create_created_body.go
Normal file
19
api/types/container/container_create_created_body.go
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
package container
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
// ContainerCreateCreatedBody ContainerCreateResponse
|
||||||
|
//
|
||||||
|
// OK response to ContainerCreate operation
|
||||||
|
// swagger:model ContainerCreateCreatedBody
|
||||||
|
type ContainerCreateCreatedBody struct {
|
||||||
|
|
||||||
|
// The ID of the created container
|
||||||
|
// Required: true
|
||||||
|
ID string `json:"Id"`
|
||||||
|
|
||||||
|
// Warnings encountered when creating the container
|
||||||
|
// Required: true
|
||||||
|
Warnings []string `json:"Warnings"`
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ swagger generate model -f api/swagger.yaml \
|
||||||
|
|
||||||
swagger generate model -f api/swagger.yaml \
|
swagger generate model -f api/swagger.yaml \
|
||||||
-t api -m types/container --skip-validator -C api/swagger-gen.yaml \
|
-t api -m types/container --skip-validator -C api/swagger-gen.yaml \
|
||||||
|
-n ContainerCreateResponse \
|
||||||
-n ContainerWaitResponse \
|
-n ContainerWaitResponse \
|
||||||
-n ContainerWaitExitError
|
-n ContainerWaitExitError
|
||||||
|
|
||||||
|
@ -32,7 +33,6 @@ swagger generate operation -f api/swagger.yaml \
|
||||||
-T api/templates --skip-responses --skip-parameters --skip-validator \
|
-T api/templates --skip-responses --skip-parameters --skip-validator \
|
||||||
-n Authenticate \
|
-n Authenticate \
|
||||||
-n ContainerChanges \
|
-n ContainerChanges \
|
||||||
-n ContainerCreate \
|
|
||||||
-n ContainerTop \
|
-n ContainerTop \
|
||||||
-n ContainerUpdate \
|
-n ContainerUpdate \
|
||||||
-n ImageHistory
|
-n ImageHistory
|
||||||
|
|
Loading…
Add table
Reference in a new issue