Преглед на файлове

Merge pull request #43629 from gesellix/int64-fields

Annotate some swagger documented types as int64
Tianon Gravi преди 3 години
родител
ревизия
c0069b83bc
променени са 4 файла, в които са добавени 21 реда и са изтрити 6 реда
  1. 9 2
      api/swagger.yaml
  2. 1 1
      api/types/image_summary.go
  3. 1 1
      api/types/types.go
  4. 10 2
      docs/api/v1.41.yaml

+ 9 - 2
api/swagger.yaml

@@ -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"

+ 1 - 1
api/types/image_summary.go

@@ -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.
 	//
 	//

+ 1 - 1
api/types/types.go

@@ -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

+ 10 - 2
docs/api/v1.41.yaml

@@ -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"