mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Annotate some swagger documented types as int64
Using the swagger.yaml to generate api models will create incompatible field types. Some inconsistencies had already been mentioned at #39131. I've added more fixes from real life experience, some only occurring on Windows. Closes #39131 Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
This commit is contained in:
parent
8abb84c734
commit
345346d7c6
4 changed files with 21 additions and 6 deletions
|
@ -771,11 +771,13 @@ definitions:
|
||||||
The time to wait between checks in nanoseconds. It should be 0 or at
|
The time to wait between checks in nanoseconds. It should be 0 or at
|
||||||
least 1000000 (1 ms). 0 means inherit.
|
least 1000000 (1 ms). 0 means inherit.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
Timeout:
|
Timeout:
|
||||||
description: |
|
description: |
|
||||||
The time to wait before considering the check to have hung. It should
|
The time to wait before considering the check to have hung. It should
|
||||||
be 0 or at least 1000000 (1 ms). 0 means inherit.
|
be 0 or at least 1000000 (1 ms). 0 means inherit.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
Retries:
|
Retries:
|
||||||
description: |
|
description: |
|
||||||
The number of consecutive failures needed to consider a container as
|
The number of consecutive failures needed to consider a container as
|
||||||
|
@ -787,6 +789,7 @@ definitions:
|
||||||
health-retries countdown in nanoseconds. It should be 0 or at least
|
health-retries countdown in nanoseconds. It should be 0 or at least
|
||||||
1000000 (1 ms). 0 means inherit.
|
1000000 (1 ms). 0 means inherit.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
|
||||||
Health:
|
Health:
|
||||||
description: |
|
description: |
|
||||||
|
@ -1625,7 +1628,7 @@ definitions:
|
||||||
List of image names/tags in the local image cache that reference this
|
List of image names/tags in the local image cache that reference this
|
||||||
image.
|
image.
|
||||||
|
|
||||||
Multiple image tags can refer to the same imagem and this list may be
|
Multiple image tags can refer to the same image, and this list may be
|
||||||
empty if no tags reference the image, in which case the image is
|
empty if no tags reference the image, in which case the image is
|
||||||
"untagged", in which case it can still be referenced by its ID.
|
"untagged", in which case it can still be referenced by its ID.
|
||||||
type: "array"
|
type: "array"
|
||||||
|
@ -1826,7 +1829,7 @@ definitions:
|
||||||
List of image names/tags in the local image cache that reference this
|
List of image names/tags in the local image cache that reference this
|
||||||
image.
|
image.
|
||||||
|
|
||||||
Multiple image tags can refer to the same imagem and this list may be
|
Multiple image tags can refer to the same image, and this list may be
|
||||||
empty if no tags reference the image, in which case the image is
|
empty if no tags reference the image, in which case the image is
|
||||||
"untagged", in which case it can still be referenced by its ID.
|
"untagged", in which case it can still be referenced by its ID.
|
||||||
type: "array"
|
type: "array"
|
||||||
|
@ -1876,6 +1879,7 @@ definitions:
|
||||||
This size is not calculated by default. `-1` indicates that the value
|
This size is not calculated by default. `-1` indicates that the value
|
||||||
has not been set / calculated.
|
has not been set / calculated.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
example: 1239828
|
example: 1239828
|
||||||
VirtualSize:
|
VirtualSize:
|
||||||
|
@ -2023,6 +2027,7 @@ definitions:
|
||||||
properties:
|
properties:
|
||||||
Size:
|
Size:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
default: -1
|
default: -1
|
||||||
description: |
|
description: |
|
||||||
Amount of disk space used by the volume (in bytes). This information
|
Amount of disk space used by the volume (in bytes). This information
|
||||||
|
@ -2032,6 +2037,7 @@ definitions:
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
RefCount:
|
RefCount:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
default: -1
|
default: -1
|
||||||
description: |
|
description: |
|
||||||
The number of containers referencing this volume. This field
|
The number of containers referencing this volume. This field
|
||||||
|
@ -4655,6 +4661,7 @@ definitions:
|
||||||
StatusCode:
|
StatusCode:
|
||||||
description: "Exit code of the container"
|
description: "Exit code of the container"
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
Error:
|
Error:
|
||||||
$ref: "#/definitions/ContainerWaitExitError"
|
$ref: "#/definitions/ContainerWaitExitError"
|
||||||
|
|
|
@ -61,7 +61,7 @@ type ImageSummary struct {
|
||||||
// List of image names/tags in the local image cache that reference this
|
// List of image names/tags in the local image cache that reference this
|
||||||
// image.
|
// image.
|
||||||
//
|
//
|
||||||
// Multiple image tags can refer to the same imagem and this list may be
|
// Multiple image tags can refer to the same image, and this list may be
|
||||||
// empty if no tags reference the image, in which case the image is
|
// empty if no tags reference the image, in which case the image is
|
||||||
// "untagged", in which case it can still be referenced by its ID.
|
// "untagged", in which case it can still be referenced by its ID.
|
||||||
//
|
//
|
||||||
|
|
|
@ -48,7 +48,7 @@ type ImageInspect struct {
|
||||||
// RepoTags is a list of image names/tags in the local image cache that
|
// RepoTags is a list of image names/tags in the local image cache that
|
||||||
// reference this image.
|
// reference this image.
|
||||||
//
|
//
|
||||||
// Multiple image tags can refer to the same imagem and this list may be
|
// Multiple image tags can refer to the same image, and this list may be
|
||||||
// empty if no tags reference the image, in which case the image is
|
// empty if no tags reference the image, in which case the image is
|
||||||
// "untagged", in which case it can still be referenced by its ID.
|
// "untagged", in which case it can still be referenced by its ID.
|
||||||
RepoTags []string
|
RepoTags []string
|
||||||
|
|
|
@ -773,11 +773,13 @@ definitions:
|
||||||
The time to wait between checks in nanoseconds. It should be 0 or at
|
The time to wait between checks in nanoseconds. It should be 0 or at
|
||||||
least 1000000 (1 ms). 0 means inherit.
|
least 1000000 (1 ms). 0 means inherit.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
Timeout:
|
Timeout:
|
||||||
description: |
|
description: |
|
||||||
The time to wait before considering the check to have hung. It should
|
The time to wait before considering the check to have hung. It should
|
||||||
be 0 or at least 1000000 (1 ms). 0 means inherit.
|
be 0 or at least 1000000 (1 ms). 0 means inherit.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
Retries:
|
Retries:
|
||||||
description: |
|
description: |
|
||||||
The number of consecutive failures needed to consider a container as
|
The number of consecutive failures needed to consider a container as
|
||||||
|
@ -789,6 +791,7 @@ definitions:
|
||||||
health-retries countdown in nanoseconds. It should be 0 or at least
|
health-retries countdown in nanoseconds. It should be 0 or at least
|
||||||
1000000 (1 ms). 0 means inherit.
|
1000000 (1 ms). 0 means inherit.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
|
|
||||||
Health:
|
Health:
|
||||||
description: |
|
description: |
|
||||||
|
@ -1107,6 +1110,7 @@ definitions:
|
||||||
remapping option is enabled.
|
remapping option is enabled.
|
||||||
ShmSize:
|
ShmSize:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
description: |
|
description: |
|
||||||
Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
|
Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
|
||||||
minimum: 0
|
minimum: 0
|
||||||
|
@ -1627,7 +1631,7 @@ definitions:
|
||||||
List of image names/tags in the local image cache that reference this
|
List of image names/tags in the local image cache that reference this
|
||||||
image.
|
image.
|
||||||
|
|
||||||
Multiple image tags can refer to the same imagem and this list may be
|
Multiple image tags can refer to the same image, and this list may be
|
||||||
empty if no tags reference the image, in which case the image is
|
empty if no tags reference the image, in which case the image is
|
||||||
"untagged", in which case it can still be referenced by its ID.
|
"untagged", in which case it can still be referenced by its ID.
|
||||||
type: "array"
|
type: "array"
|
||||||
|
@ -1828,7 +1832,7 @@ definitions:
|
||||||
List of image names/tags in the local image cache that reference this
|
List of image names/tags in the local image cache that reference this
|
||||||
image.
|
image.
|
||||||
|
|
||||||
Multiple image tags can refer to the same imagem and this list may be
|
Multiple image tags can refer to the same image, and this list may be
|
||||||
empty if no tags reference the image, in which case the image is
|
empty if no tags reference the image, in which case the image is
|
||||||
"untagged", in which case it can still be referenced by its ID.
|
"untagged", in which case it can still be referenced by its ID.
|
||||||
type: "array"
|
type: "array"
|
||||||
|
@ -1878,6 +1882,7 @@ definitions:
|
||||||
This size is not calculated by default. `-1` indicates that the value
|
This size is not calculated by default. `-1` indicates that the value
|
||||||
has not been set / calculated.
|
has not been set / calculated.
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
example: 1239828
|
example: 1239828
|
||||||
VirtualSize:
|
VirtualSize:
|
||||||
|
@ -2022,6 +2027,7 @@ definitions:
|
||||||
properties:
|
properties:
|
||||||
Size:
|
Size:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
default: -1
|
default: -1
|
||||||
description: |
|
description: |
|
||||||
Amount of disk space used by the volume (in bytes). This information
|
Amount of disk space used by the volume (in bytes). This information
|
||||||
|
@ -2031,6 +2037,7 @@ definitions:
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
RefCount:
|
RefCount:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
default: -1
|
default: -1
|
||||||
description: |
|
description: |
|
||||||
The number of containers referencing this volume. This field
|
The number of containers referencing this volume. This field
|
||||||
|
@ -4632,6 +4639,7 @@ definitions:
|
||||||
StatusCode:
|
StatusCode:
|
||||||
description: "Exit code of the container"
|
description: "Exit code of the container"
|
||||||
type: "integer"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
Error:
|
Error:
|
||||||
$ref: "#/definitions/ContainerWaitExitError"
|
$ref: "#/definitions/ContainerWaitExitError"
|
||||||
|
|
Loading…
Add table
Reference in a new issue