Browse code

Merge pull request #41273 from thaJeztah/19.03_backport_swagger_fixes

[19.03 backport] Assorted swagger fixes

Tibor Vass authored on 2020/07/28 21:30:31
Showing 3 changed files
... ...
@@ -1874,12 +1874,24 @@ definitions:
1874 1874
       Shared:
1875 1875
         type: "boolean"
1876 1876
       Size:
1877
+        description: |
1878
+          Amount of disk space used by the build cache (in bytes).
1877 1879
         type: "integer"
1878 1880
       CreatedAt:
1879
-        type: "integer"
1881
+        description: |
1882
+          Date and time at which the build cache was created in
1883
+          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1884
+        type: "string"
1885
+        format: "dateTime"
1886
+        example: "2016-08-18T10:44:24.496525531Z"
1880 1887
       LastUsedAt:
1881
-        type: "integer"
1888
+        description: |
1889
+          Date and time at which the build cache was last used in
1890
+          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1891
+        type: "string"
1892
+        format: "dateTime"
1882 1893
         x-nullable: true
1894
+        example: "2017-08-09T07:09:37.632105588Z"
1883 1895
       UsageCount:
1884 1896
         type: "integer"
1885 1897
 
... ...
@@ -4105,6 +4117,103 @@ definitions:
4105 4105
         x-nullable: true
4106 4106
         $ref: "#/definitions/Health"
4107 4107
 
4108
+  SystemVersion:
4109
+    type: "object"
4110
+    description: |
4111
+      Response of Engine API: GET "/version"
4112
+    properties:
4113
+      Platform:
4114
+        type: "object"
4115
+        required: [Name]
4116
+        properties:
4117
+          Name:
4118
+            type: "string"
4119
+      Components:
4120
+        type: "array"
4121
+        description: |
4122
+          Information about system components
4123
+        items:
4124
+          type: "object"
4125
+          x-go-name: ComponentVersion
4126
+          required: [Name, Version]
4127
+          properties:
4128
+            Name:
4129
+              description: |
4130
+                Name of the component
4131
+              type: "string"
4132
+              example: "Engine"
4133
+            Version:
4134
+              description: |
4135
+                Version of the component
4136
+              type: "string"
4137
+              x-nullable: false
4138
+              example: "19.03.12"
4139
+            Details:
4140
+              description: |
4141
+                Key/value pairs of strings with additional information about the
4142
+                component. These values are intended for informational purposes
4143
+                only, and their content is not defined, and not part of the API
4144
+                specification.
4145
+
4146
+                These messages can be printed by the client as information to the user.
4147
+              type: "object"
4148
+              x-nullable: true
4149
+      Version:
4150
+        description: "The version of the daemon"
4151
+        type: "string"
4152
+        example: "19.03.12"
4153
+      ApiVersion:
4154
+        description: |
4155
+          The default (and highest) API version that is supported by the daemon
4156
+        type: "string"
4157
+        example: "1.40"
4158
+      MinAPIVersion:
4159
+        description: |
4160
+          The minimum API version that is supported by the daemon
4161
+        type: "string"
4162
+        example: "1.12"
4163
+      GitCommit:
4164
+        description: |
4165
+          The Git commit of the source code that was used to build the daemon
4166
+        type: "string"
4167
+        example: "48a66213fe"
4168
+      GoVersion:
4169
+        description: |
4170
+          The version Go used to compile the daemon, and the version of the Go
4171
+          runtime in use.
4172
+        type: "string"
4173
+        example: "go1.13.14"
4174
+      Os:
4175
+        description: |
4176
+          The operating system that the daemon is running on ("linux" or "windows")
4177
+        type: "string"
4178
+        example: "linux"
4179
+      Arch:
4180
+        description: |
4181
+          The architecture that the daemon is running on
4182
+        type: "string"
4183
+        example: "amd64"
4184
+      KernelVersion:
4185
+        description: |
4186
+          The kernel version (`uname -r`) that the daemon is running on.
4187
+
4188
+          This field is omitted when empty.
4189
+        type: "string"
4190
+        example: "4.19.76-linuxkit"
4191
+      Experimental:
4192
+        description: |
4193
+          Indicates if the daemon is started with experimental features enabled.
4194
+
4195
+          This field is omitted when empty / false.
4196
+        type: "boolean"
4197
+        example: true
4198
+      BuildTime:
4199
+        description: |
4200
+          The date and time that the daemon was compiled.
4201
+        type: "string"
4202
+        example: "2020-06-22T15:49:27.000000000+00:00"
4203
+
4204
+
4108 4205
   SystemInfo:
4109 4206
     type: "object"
4110 4207
     properties:
... ...
@@ -7724,63 +7833,7 @@ paths:
7724 7724
         200:
7725 7725
           description: "no error"
7726 7726
           schema:
7727
-            type: "object"
7728
-            title: "SystemVersionResponse"
7729
-            properties:
7730
-              Platform:
7731
-                type: "object"
7732
-                required: [Name]
7733
-                properties:
7734
-                  Name:
7735
-                    type: "string"
7736
-              Components:
7737
-                type: "array"
7738
-                items:
7739
-                  type: "object"
7740
-                  x-go-name: ComponentVersion
7741
-                  required: [Name, Version]
7742
-                  properties:
7743
-                    Name:
7744
-                      type: "string"
7745
-                    Version:
7746
-                      type: "string"
7747
-                      x-nullable: false
7748
-                    Details:
7749
-                      type: "object"
7750
-                      x-nullable: true
7751
-
7752
-              Version:
7753
-                type: "string"
7754
-              ApiVersion:
7755
-                type: "string"
7756
-              MinAPIVersion:
7757
-                type: "string"
7758
-              GitCommit:
7759
-                type: "string"
7760
-              GoVersion:
7761
-                type: "string"
7762
-              Os:
7763
-                type: "string"
7764
-              Arch:
7765
-                type: "string"
7766
-              KernelVersion:
7767
-                type: "string"
7768
-              Experimental:
7769
-                type: "boolean"
7770
-              BuildTime:
7771
-                type: "string"
7772
-          examples:
7773
-            application/json:
7774
-              Version: "17.04.0"
7775
-              Os: "linux"
7776
-              KernelVersion: "3.19.0-23-generic"
7777
-              GoVersion: "go1.7.5"
7778
-              GitCommit: "deadbee"
7779
-              Arch: "amd64"
7780
-              ApiVersion: "1.27"
7781
-              MinAPIVersion: "1.12"
7782
-              BuildTime: "2016-06-14T07:09:13.444803460+00:00"
7783
-              Experimental: true
7727
+            $ref: "#/definitions/SystemVersion"
7784 7728
         500:
7785 7729
           description: "server error"
7786 7730
           schema:
... ...
@@ -1815,12 +1815,24 @@ definitions:
1815 1815
       Shared:
1816 1816
         type: "boolean"
1817 1817
       Size:
1818
+        description: |
1819
+          Amount of disk space used by the build cache (in bytes).
1818 1820
         type: "integer"
1819 1821
       CreatedAt:
1820
-        type: "integer"
1822
+        description: |
1823
+          Date and time at which the build cache was created in
1824
+          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1825
+        type: "string"
1826
+        format: "dateTime"
1827
+        example: "2016-08-18T10:44:24.496525531Z"
1821 1828
       LastUsedAt:
1822
-        type: "integer"
1829
+        description: |
1830
+          Date and time at which the build cache was last used in
1831
+          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1832
+        type: "string"
1833
+        format: "dateTime"
1823 1834
         x-nullable: true
1835
+        example: "2017-08-09T07:09:37.632105588Z"
1824 1836
       UsageCount:
1825 1837
         type: "integer"
1826 1838
 
... ...
@@ -3987,6 +3999,103 @@ definitions:
3987 3987
         x-nullable: true
3988 3988
         $ref: "#/definitions/Health"
3989 3989
 
3990
+  SystemVersion:
3991
+    type: "object"
3992
+    description: |
3993
+      Response of Engine API: GET "/version"
3994
+    properties:
3995
+      Platform:
3996
+        type: "object"
3997
+        required: [Name]
3998
+        properties:
3999
+          Name:
4000
+            type: "string"
4001
+      Components:
4002
+        type: "array"
4003
+        description: |
4004
+          Information about system components
4005
+        items:
4006
+          type: "object"
4007
+          x-go-name: ComponentVersion
4008
+          required: [Name, Version]
4009
+          properties:
4010
+            Name:
4011
+              description: |
4012
+                Name of the component
4013
+              type: "string"
4014
+              example: "Engine"
4015
+            Version:
4016
+              description: |
4017
+                Version of the component
4018
+              type: "string"
4019
+              x-nullable: false
4020
+              example: "19.03.12"
4021
+            Details:
4022
+              description: |
4023
+                Key/value pairs of strings with additional information about the
4024
+                component. These values are intended for informational purposes
4025
+                only, and their content is not defined, and not part of the API
4026
+                specification.
4027
+
4028
+                These messages can be printed by the client as information to the user.
4029
+              type: "object"
4030
+              x-nullable: true
4031
+      Version:
4032
+        description: "The version of the daemon"
4033
+        type: "string"
4034
+        example: "19.03.12"
4035
+      ApiVersion:
4036
+        description: |
4037
+          The default (and highest) API version that is supported by the daemon
4038
+        type: "string"
4039
+        example: "1.40"
4040
+      MinAPIVersion:
4041
+        description: |
4042
+          The minimum API version that is supported by the daemon
4043
+        type: "string"
4044
+        example: "1.12"
4045
+      GitCommit:
4046
+        description: |
4047
+          The Git commit of the source code that was used to build the daemon
4048
+        type: "string"
4049
+        example: "48a66213fe"
4050
+      GoVersion:
4051
+        description: |
4052
+          The version Go used to compile the daemon, and the version of the Go
4053
+          runtime in use.
4054
+        type: "string"
4055
+        example: "go1.13.14"
4056
+      Os:
4057
+        description: |
4058
+          The operating system that the daemon is running on ("linux" or "windows")
4059
+        type: "string"
4060
+        example: "linux"
4061
+      Arch:
4062
+        description: |
4063
+          The architecture that the daemon is running on
4064
+        type: "string"
4065
+        example: "amd64"
4066
+      KernelVersion:
4067
+        description: |
4068
+          The kernel version (`uname -r`) that the daemon is running on.
4069
+
4070
+          This field is omitted when empty.
4071
+        type: "string"
4072
+        example: "4.19.76-linuxkit"
4073
+      Experimental:
4074
+        description: |
4075
+          Indicates if the daemon is started with experimental features enabled.
4076
+
4077
+          This field is omitted when empty / false.
4078
+        type: "boolean"
4079
+        example: true
4080
+      BuildTime:
4081
+        description: |
4082
+          The date and time that the daemon was compiled.
4083
+        type: "string"
4084
+        example: "2020-06-22T15:49:27.000000000+00:00"
4085
+
4086
+
3990 4087
   SystemInfo:
3991 4088
     type: "object"
3992 4089
     properties:
... ...
@@ -7581,63 +7690,7 @@ paths:
7581 7581
         200:
7582 7582
           description: "no error"
7583 7583
           schema:
7584
-            type: "object"
7585
-            title: "SystemVersionResponse"
7586
-            properties:
7587
-              Platform:
7588
-                type: "object"
7589
-                required: [Name]
7590
-                properties:
7591
-                  Name:
7592
-                    type: "string"
7593
-              Components:
7594
-                type: "array"
7595
-                items:
7596
-                  type: "object"
7597
-                  x-go-name: ComponentVersion
7598
-                  required: [Name, Version]
7599
-                  properties:
7600
-                    Name:
7601
-                      type: "string"
7602
-                    Version:
7603
-                      type: "string"
7604
-                      x-nullable: false
7605
-                    Details:
7606
-                      type: "object"
7607
-                      x-nullable: true
7608
-
7609
-              Version:
7610
-                type: "string"
7611
-              ApiVersion:
7612
-                type: "string"
7613
-              MinAPIVersion:
7614
-                type: "string"
7615
-              GitCommit:
7616
-                type: "string"
7617
-              GoVersion:
7618
-                type: "string"
7619
-              Os:
7620
-                type: "string"
7621
-              Arch:
7622
-                type: "string"
7623
-              KernelVersion:
7624
-                type: "string"
7625
-              Experimental:
7626
-                type: "boolean"
7627
-              BuildTime:
7628
-                type: "string"
7629
-          examples:
7630
-            application/json:
7631
-              Version: "17.04.0"
7632
-              Os: "linux"
7633
-              KernelVersion: "3.19.0-23-generic"
7634
-              GoVersion: "go1.7.5"
7635
-              GitCommit: "deadbee"
7636
-              Arch: "amd64"
7637
-              ApiVersion: "1.27"
7638
-              MinAPIVersion: "1.12"
7639
-              BuildTime: "2016-06-14T07:09:13.444803460+00:00"
7640
-              Experimental: true
7584
+            $ref: "#/definitions/SystemVersion"
7641 7585
         500:
7642 7586
           description: "server error"
7643 7587
           schema:
... ...
@@ -1874,12 +1874,24 @@ definitions:
1874 1874
       Shared:
1875 1875
         type: "boolean"
1876 1876
       Size:
1877
+        description: |
1878
+          Amount of disk space used by the build cache (in bytes).
1877 1879
         type: "integer"
1878 1880
       CreatedAt:
1879
-        type: "integer"
1881
+        description: |
1882
+          Date and time at which the build cache was created in
1883
+          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1884
+        type: "string"
1885
+        format: "dateTime"
1886
+        example: "2016-08-18T10:44:24.496525531Z"
1880 1887
       LastUsedAt:
1881
-        type: "integer"
1888
+        description: |
1889
+          Date and time at which the build cache was last used in
1890
+          [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
1891
+        type: "string"
1892
+        format: "dateTime"
1882 1893
         x-nullable: true
1894
+        example: "2017-08-09T07:09:37.632105588Z"
1883 1895
       UsageCount:
1884 1896
         type: "integer"
1885 1897
 
... ...
@@ -4105,6 +4117,103 @@ definitions:
4105 4105
         x-nullable: true
4106 4106
         $ref: "#/definitions/Health"
4107 4107
 
4108
+  SystemVersion:
4109
+    type: "object"
4110
+    description: |
4111
+      Response of Engine API: GET "/version"
4112
+    properties:
4113
+      Platform:
4114
+        type: "object"
4115
+        required: [Name]
4116
+        properties:
4117
+          Name:
4118
+            type: "string"
4119
+      Components:
4120
+        type: "array"
4121
+        description: |
4122
+          Information about system components
4123
+        items:
4124
+          type: "object"
4125
+          x-go-name: ComponentVersion
4126
+          required: [Name, Version]
4127
+          properties:
4128
+            Name:
4129
+              description: |
4130
+                Name of the component
4131
+              type: "string"
4132
+              example: "Engine"
4133
+            Version:
4134
+              description: |
4135
+                Version of the component
4136
+              type: "string"
4137
+              x-nullable: false
4138
+              example: "19.03.12"
4139
+            Details:
4140
+              description: |
4141
+                Key/value pairs of strings with additional information about the
4142
+                component. These values are intended for informational purposes
4143
+                only, and their content is not defined, and not part of the API
4144
+                specification.
4145
+
4146
+                These messages can be printed by the client as information to the user.
4147
+              type: "object"
4148
+              x-nullable: true
4149
+      Version:
4150
+        description: "The version of the daemon"
4151
+        type: "string"
4152
+        example: "19.03.12"
4153
+      ApiVersion:
4154
+        description: |
4155
+          The default (and highest) API version that is supported by the daemon
4156
+        type: "string"
4157
+        example: "1.40"
4158
+      MinAPIVersion:
4159
+        description: |
4160
+          The minimum API version that is supported by the daemon
4161
+        type: "string"
4162
+        example: "1.12"
4163
+      GitCommit:
4164
+        description: |
4165
+          The Git commit of the source code that was used to build the daemon
4166
+        type: "string"
4167
+        example: "48a66213fe"
4168
+      GoVersion:
4169
+        description: |
4170
+          The version Go used to compile the daemon, and the version of the Go
4171
+          runtime in use.
4172
+        type: "string"
4173
+        example: "go1.13.14"
4174
+      Os:
4175
+        description: |
4176
+          The operating system that the daemon is running on ("linux" or "windows")
4177
+        type: "string"
4178
+        example: "linux"
4179
+      Arch:
4180
+        description: |
4181
+          The architecture that the daemon is running on
4182
+        type: "string"
4183
+        example: "amd64"
4184
+      KernelVersion:
4185
+        description: |
4186
+          The kernel version (`uname -r`) that the daemon is running on.
4187
+
4188
+          This field is omitted when empty.
4189
+        type: "string"
4190
+        example: "4.19.76-linuxkit"
4191
+      Experimental:
4192
+        description: |
4193
+          Indicates if the daemon is started with experimental features enabled.
4194
+
4195
+          This field is omitted when empty / false.
4196
+        type: "boolean"
4197
+        example: true
4198
+      BuildTime:
4199
+        description: |
4200
+          The date and time that the daemon was compiled.
4201
+        type: "string"
4202
+        example: "2020-06-22T15:49:27.000000000+00:00"
4203
+
4204
+
4108 4205
   SystemInfo:
4109 4206
     type: "object"
4110 4207
     properties:
... ...
@@ -7724,63 +7833,7 @@ paths:
7724 7724
         200:
7725 7725
           description: "no error"
7726 7726
           schema:
7727
-            type: "object"
7728
-            title: "SystemVersionResponse"
7729
-            properties:
7730
-              Platform:
7731
-                type: "object"
7732
-                required: [Name]
7733
-                properties:
7734
-                  Name:
7735
-                    type: "string"
7736
-              Components:
7737
-                type: "array"
7738
-                items:
7739
-                  type: "object"
7740
-                  x-go-name: ComponentVersion
7741
-                  required: [Name, Version]
7742
-                  properties:
7743
-                    Name:
7744
-                      type: "string"
7745
-                    Version:
7746
-                      type: "string"
7747
-                      x-nullable: false
7748
-                    Details:
7749
-                      type: "object"
7750
-                      x-nullable: true
7751
-
7752
-              Version:
7753
-                type: "string"
7754
-              ApiVersion:
7755
-                type: "string"
7756
-              MinAPIVersion:
7757
-                type: "string"
7758
-              GitCommit:
7759
-                type: "string"
7760
-              GoVersion:
7761
-                type: "string"
7762
-              Os:
7763
-                type: "string"
7764
-              Arch:
7765
-                type: "string"
7766
-              KernelVersion:
7767
-                type: "string"
7768
-              Experimental:
7769
-                type: "boolean"
7770
-              BuildTime:
7771
-                type: "string"
7772
-          examples:
7773
-            application/json:
7774
-              Version: "17.04.0"
7775
-              Os: "linux"
7776
-              KernelVersion: "3.19.0-23-generic"
7777
-              GoVersion: "go1.7.5"
7778
-              GitCommit: "deadbee"
7779
-              Arch: "amd64"
7780
-              ApiVersion: "1.27"
7781
-              MinAPIVersion: "1.12"
7782
-              BuildTime: "2016-06-14T07:09:13.444803460+00:00"
7783
-              Experimental: true
7727
+            $ref: "#/definitions/SystemVersion"
7784 7728
         500:
7785 7729
           description: "server error"
7786 7730
           schema: