api: swagger: move ContainerWaitResponse to definitions
This should help with CI being unstable when generating the types (due to Go randomizing order). Unfortunately, the (file) names are a bit ugly, but addressing that in a follow-up. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
444b27910c
commit
e4c6ca36ae
5 changed files with 60 additions and 45 deletions
|
@ -4460,6 +4460,29 @@ definitions:
|
|||
Health:
|
||||
$ref: "#/definitions/Health"
|
||||
|
||||
ContainerWaitResponse:
|
||||
description: "OK response to ContainerWait operation"
|
||||
type: "object"
|
||||
x-go-name: "ContainerWaitOKBody"
|
||||
title: "ContainerWaitResponse"
|
||||
required: [StatusCode, Error]
|
||||
properties:
|
||||
StatusCode:
|
||||
description: "Exit code of the container"
|
||||
type: "integer"
|
||||
x-nullable: false
|
||||
Error:
|
||||
$ref: "#/definitions/ContainerWaitExitError"
|
||||
|
||||
ContainerWaitExitError:
|
||||
description: "container waiting error, if any"
|
||||
type: "object"
|
||||
x-go-name: "ContainerWaitOKBodyError"
|
||||
properties:
|
||||
Message:
|
||||
description: "Details of an error"
|
||||
type: "string"
|
||||
|
||||
SystemVersion:
|
||||
type: "object"
|
||||
description: |
|
||||
|
@ -7192,22 +7215,7 @@ paths:
|
|||
200:
|
||||
description: "The container has exit."
|
||||
schema:
|
||||
type: "object"
|
||||
title: "ContainerWaitResponse"
|
||||
description: "OK response to ContainerWait operation"
|
||||
required: [StatusCode]
|
||||
properties:
|
||||
StatusCode:
|
||||
description: "Exit code of the container"
|
||||
type: "integer"
|
||||
x-nullable: false
|
||||
Error:
|
||||
description: "container waiting error, if any"
|
||||
type: "object"
|
||||
properties:
|
||||
Message:
|
||||
description: "Details of an error"
|
||||
type: "string"
|
||||
$ref: "#/definitions/ContainerWaitResponse"
|
||||
400:
|
||||
description: "bad parameter"
|
||||
schema:
|
||||
|
|
|
@ -1,28 +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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ContainerWaitOKBodyError container waiting error, if any
|
||||
// swagger:model ContainerWaitOKBodyError
|
||||
type ContainerWaitOKBodyError struct {
|
||||
|
||||
// Details of an error
|
||||
Message string `json:"Message,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerWaitOKBody OK response to ContainerWait operation
|
||||
// swagger:model ContainerWaitOKBody
|
||||
type ContainerWaitOKBody struct {
|
||||
|
||||
// error
|
||||
// Required: true
|
||||
Error *ContainerWaitOKBodyError `json:"Error"`
|
||||
|
||||
// Exit code of the container
|
||||
// Required: true
|
||||
StatusCode int64 `json:"StatusCode"`
|
||||
}
|
19
api/types/container/container_wait_o_k_body.go
Normal file
19
api/types/container/container_wait_o_k_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
|
||||
|
||||
// ContainerWaitOKBody ContainerWaitResponse
|
||||
//
|
||||
// OK response to ContainerWait operation
|
||||
// swagger:model ContainerWaitOKBody
|
||||
type ContainerWaitOKBody struct {
|
||||
|
||||
// error
|
||||
// Required: true
|
||||
Error *ContainerWaitOKBodyError `json:"Error"`
|
||||
|
||||
// Exit code of the container
|
||||
// Required: true
|
||||
StatusCode int64 `json:"StatusCode"`
|
||||
}
|
12
api/types/container/container_wait_o_k_body_error.go
Normal file
12
api/types/container/container_wait_o_k_body_error.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package container
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
// ContainerWaitOKBodyError container waiting error, if any
|
||||
// swagger:model ContainerWaitOKBodyError
|
||||
type ContainerWaitOKBodyError struct {
|
||||
|
||||
// Details of an error
|
||||
Message string `json:"Message,omitempty"`
|
||||
}
|
|
@ -13,6 +13,11 @@ swagger generate model -f api/swagger.yaml \
|
|||
-n ServiceUpdateResponse \
|
||||
-n Volume
|
||||
|
||||
swagger generate model -f api/swagger.yaml \
|
||||
-t api -m types/container --skip-validator -C api/swagger-gen.yaml \
|
||||
-n ContainerWaitResponse \
|
||||
-n ContainerWaitExitError
|
||||
|
||||
swagger generate model -f api/swagger.yaml \
|
||||
-t api -m types/volume --skip-validator -C api/swagger-gen.yaml \
|
||||
-n VolumeCreateOptions
|
||||
|
@ -25,6 +30,5 @@ swagger generate operation -f api/swagger.yaml \
|
|||
-n ContainerCreate \
|
||||
-n ContainerTop \
|
||||
-n ContainerUpdate \
|
||||
-n ContainerWait \
|
||||
-n ImageHistory \
|
||||
-n VolumeList
|
||||
|
|
Loading…
Add table
Reference in a new issue