Browse code

Merge pull request #41236 from thaJeztah/move_version_to_definitions

Swagger: move system version response to definitions

Sebastiaan van Stijn authored on 2020/07/28 16:35:20
Showing 3 changed files
... ...
@@ -4248,6 +4248,103 @@ definitions:
4248 4248
         x-nullable: true
4249 4249
         $ref: "#/definitions/Health"
4250 4250
 
4251
+  SystemVersion:
4252
+    type: "object"
4253
+    description: |
4254
+      Response of Engine API: GET "/version"
4255
+    properties:
4256
+      Platform:
4257
+        type: "object"
4258
+        required: [Name]
4259
+        properties:
4260
+          Name:
4261
+            type: "string"
4262
+      Components:
4263
+        type: "array"
4264
+        description: |
4265
+          Information about system components
4266
+        items:
4267
+          type: "object"
4268
+          x-go-name: ComponentVersion
4269
+          required: [Name, Version]
4270
+          properties:
4271
+            Name:
4272
+              description: |
4273
+                Name of the component
4274
+              type: "string"
4275
+              example: "Engine"
4276
+            Version:
4277
+              description: |
4278
+                Version of the component
4279
+              type: "string"
4280
+              x-nullable: false
4281
+              example: "19.03.12"
4282
+            Details:
4283
+              description: |
4284
+                Key/value pairs of strings with additional information about the
4285
+                component. These values are intended for informational purposes
4286
+                only, and their content is not defined, and not part of the API
4287
+                specification.
4288
+
4289
+                These messages can be printed by the client as information to the user.
4290
+              type: "object"
4291
+              x-nullable: true
4292
+      Version:
4293
+        description: "The version of the daemon"
4294
+        type: "string"
4295
+        example: "19.03.12"
4296
+      ApiVersion:
4297
+        description: |
4298
+          The default (and highest) API version that is supported by the daemon
4299
+        type: "string"
4300
+        example: "1.40"
4301
+      MinAPIVersion:
4302
+        description: |
4303
+          The minimum API version that is supported by the daemon
4304
+        type: "string"
4305
+        example: "1.12"
4306
+      GitCommit:
4307
+        description: |
4308
+          The Git commit of the source code that was used to build the daemon
4309
+        type: "string"
4310
+        example: "48a66213fe"
4311
+      GoVersion:
4312
+        description: |
4313
+          The version Go used to compile the daemon, and the version of the Go
4314
+          runtime in use.
4315
+        type: "string"
4316
+        example: "go1.13.14"
4317
+      Os:
4318
+        description: |
4319
+          The operating system that the daemon is running on ("linux" or "windows")
4320
+        type: "string"
4321
+        example: "linux"
4322
+      Arch:
4323
+        description: |
4324
+          The architecture that the daemon is running on
4325
+        type: "string"
4326
+        example: "amd64"
4327
+      KernelVersion:
4328
+        description: |
4329
+          The kernel version (`uname -r`) that the daemon is running on.
4330
+
4331
+          This field is omitted when empty.
4332
+        type: "string"
4333
+        example: "4.19.76-linuxkit"
4334
+      Experimental:
4335
+        description: |
4336
+          Indicates if the daemon is started with experimental features enabled.
4337
+
4338
+          This field is omitted when empty / false.
4339
+        type: "boolean"
4340
+        example: true
4341
+      BuildTime:
4342
+        description: |
4343
+          The date and time that the daemon was compiled.
4344
+        type: "string"
4345
+        example: "2020-06-22T15:49:27.000000000+00:00"
4346
+
4347
+
4251 4348
   SystemInfo:
4252 4349
     type: "object"
4253 4350
     properties:
... ...
@@ -7876,63 +7973,7 @@ paths:
7876 7876
         200:
7877 7877
           description: "no error"
7878 7878
           schema:
7879
-            type: "object"
7880
-            title: "SystemVersionResponse"
7881
-            properties:
7882
-              Platform:
7883
-                type: "object"
7884
-                required: [Name]
7885
-                properties:
7886
-                  Name:
7887
-                    type: "string"
7888
-              Components:
7889
-                type: "array"
7890
-                items:
7891
-                  type: "object"
7892
-                  x-go-name: ComponentVersion
7893
-                  required: [Name, Version]
7894
-                  properties:
7895
-                    Name:
7896
-                      type: "string"
7897
-                    Version:
7898
-                      type: "string"
7899
-                      x-nullable: false
7900
-                    Details:
7901
-                      type: "object"
7902
-                      x-nullable: true
7903
-
7904
-              Version:
7905
-                type: "string"
7906
-              ApiVersion:
7907
-                type: "string"
7908
-              MinAPIVersion:
7909
-                type: "string"
7910
-              GitCommit:
7911
-                type: "string"
7912
-              GoVersion:
7913
-                type: "string"
7914
-              Os:
7915
-                type: "string"
7916
-              Arch:
7917
-                type: "string"
7918
-              KernelVersion:
7919
-                type: "string"
7920
-              Experimental:
7921
-                type: "boolean"
7922
-              BuildTime:
7923
-                type: "string"
7924
-          examples:
7925
-            application/json:
7926
-              Version: "17.04.0"
7927
-              Os: "linux"
7928
-              KernelVersion: "3.19.0-23-generic"
7929
-              GoVersion: "go1.7.5"
7930
-              GitCommit: "deadbee"
7931
-              Arch: "amd64"
7932
-              ApiVersion: "1.27"
7933
-              MinAPIVersion: "1.12"
7934
-              BuildTime: "2016-06-14T07:09:13.444803460+00:00"
7935
-              Experimental: true
7879
+            $ref: "#/definitions/SystemVersion"
7936 7880
         500:
7937 7881
           description: "server error"
7938 7882
           schema:
... ...
@@ -3999,6 +3999,103 @@ definitions:
3999 3999
         x-nullable: true
4000 4000
         $ref: "#/definitions/Health"
4001 4001
 
4002
+  SystemVersion:
4003
+    type: "object"
4004
+    description: |
4005
+      Response of Engine API: GET "/version"
4006
+    properties:
4007
+      Platform:
4008
+        type: "object"
4009
+        required: [Name]
4010
+        properties:
4011
+          Name:
4012
+            type: "string"
4013
+      Components:
4014
+        type: "array"
4015
+        description: |
4016
+          Information about system components
4017
+        items:
4018
+          type: "object"
4019
+          x-go-name: ComponentVersion
4020
+          required: [Name, Version]
4021
+          properties:
4022
+            Name:
4023
+              description: |
4024
+                Name of the component
4025
+              type: "string"
4026
+              example: "Engine"
4027
+            Version:
4028
+              description: |
4029
+                Version of the component
4030
+              type: "string"
4031
+              x-nullable: false
4032
+              example: "19.03.12"
4033
+            Details:
4034
+              description: |
4035
+                Key/value pairs of strings with additional information about the
4036
+                component. These values are intended for informational purposes
4037
+                only, and their content is not defined, and not part of the API
4038
+                specification.
4039
+
4040
+                These messages can be printed by the client as information to the user.
4041
+              type: "object"
4042
+              x-nullable: true
4043
+      Version:
4044
+        description: "The version of the daemon"
4045
+        type: "string"
4046
+        example: "19.03.12"
4047
+      ApiVersion:
4048
+        description: |
4049
+          The default (and highest) API version that is supported by the daemon
4050
+        type: "string"
4051
+        example: "1.40"
4052
+      MinAPIVersion:
4053
+        description: |
4054
+          The minimum API version that is supported by the daemon
4055
+        type: "string"
4056
+        example: "1.12"
4057
+      GitCommit:
4058
+        description: |
4059
+          The Git commit of the source code that was used to build the daemon
4060
+        type: "string"
4061
+        example: "48a66213fe"
4062
+      GoVersion:
4063
+        description: |
4064
+          The version Go used to compile the daemon, and the version of the Go
4065
+          runtime in use.
4066
+        type: "string"
4067
+        example: "go1.13.14"
4068
+      Os:
4069
+        description: |
4070
+          The operating system that the daemon is running on ("linux" or "windows")
4071
+        type: "string"
4072
+        example: "linux"
4073
+      Arch:
4074
+        description: |
4075
+          The architecture that the daemon is running on
4076
+        type: "string"
4077
+        example: "amd64"
4078
+      KernelVersion:
4079
+        description: |
4080
+          The kernel version (`uname -r`) that the daemon is running on.
4081
+
4082
+          This field is omitted when empty.
4083
+        type: "string"
4084
+        example: "4.19.76-linuxkit"
4085
+      Experimental:
4086
+        description: |
4087
+          Indicates if the daemon is started with experimental features enabled.
4088
+
4089
+          This field is omitted when empty / false.
4090
+        type: "boolean"
4091
+        example: true
4092
+      BuildTime:
4093
+        description: |
4094
+          The date and time that the daemon was compiled.
4095
+        type: "string"
4096
+        example: "2020-06-22T15:49:27.000000000+00:00"
4097
+
4098
+
4002 4099
   SystemInfo:
4003 4100
     type: "object"
4004 4101
     properties:
... ...
@@ -7593,63 +7690,7 @@ paths:
7593 7593
         200:
7594 7594
           description: "no error"
7595 7595
           schema:
7596
-            type: "object"
7597
-            title: "SystemVersionResponse"
7598
-            properties:
7599
-              Platform:
7600
-                type: "object"
7601
-                required: [Name]
7602
-                properties:
7603
-                  Name:
7604
-                    type: "string"
7605
-              Components:
7606
-                type: "array"
7607
-                items:
7608
-                  type: "object"
7609
-                  x-go-name: ComponentVersion
7610
-                  required: [Name, Version]
7611
-                  properties:
7612
-                    Name:
7613
-                      type: "string"
7614
-                    Version:
7615
-                      type: "string"
7616
-                      x-nullable: false
7617
-                    Details:
7618
-                      type: "object"
7619
-                      x-nullable: true
7620
-
7621
-              Version:
7622
-                type: "string"
7623
-              ApiVersion:
7624
-                type: "string"
7625
-              MinAPIVersion:
7626
-                type: "string"
7627
-              GitCommit:
7628
-                type: "string"
7629
-              GoVersion:
7630
-                type: "string"
7631
-              Os:
7632
-                type: "string"
7633
-              Arch:
7634
-                type: "string"
7635
-              KernelVersion:
7636
-                type: "string"
7637
-              Experimental:
7638
-                type: "boolean"
7639
-              BuildTime:
7640
-                type: "string"
7641
-          examples:
7642
-            application/json:
7643
-              Version: "17.04.0"
7644
-              Os: "linux"
7645
-              KernelVersion: "3.19.0-23-generic"
7646
-              GoVersion: "go1.7.5"
7647
-              GitCommit: "deadbee"
7648
-              Arch: "amd64"
7649
-              ApiVersion: "1.27"
7650
-              MinAPIVersion: "1.12"
7651
-              BuildTime: "2016-06-14T07:09:13.444803460+00:00"
7652
-              Experimental: true
7596
+            $ref: "#/definitions/SystemVersion"
7653 7597
         500:
7654 7598
           description: "server error"
7655 7599
           schema:
... ...
@@ -4117,6 +4117,103 @@ definitions:
4117 4117
         x-nullable: true
4118 4118
         $ref: "#/definitions/Health"
4119 4119
 
4120
+  SystemVersion:
4121
+    type: "object"
4122
+    description: |
4123
+      Response of Engine API: GET "/version"
4124
+    properties:
4125
+      Platform:
4126
+        type: "object"
4127
+        required: [Name]
4128
+        properties:
4129
+          Name:
4130
+            type: "string"
4131
+      Components:
4132
+        type: "array"
4133
+        description: |
4134
+          Information about system components
4135
+        items:
4136
+          type: "object"
4137
+          x-go-name: ComponentVersion
4138
+          required: [Name, Version]
4139
+          properties:
4140
+            Name:
4141
+              description: |
4142
+                Name of the component
4143
+              type: "string"
4144
+              example: "Engine"
4145
+            Version:
4146
+              description: |
4147
+                Version of the component
4148
+              type: "string"
4149
+              x-nullable: false
4150
+              example: "19.03.12"
4151
+            Details:
4152
+              description: |
4153
+                Key/value pairs of strings with additional information about the
4154
+                component. These values are intended for informational purposes
4155
+                only, and their content is not defined, and not part of the API
4156
+                specification.
4157
+
4158
+                These messages can be printed by the client as information to the user.
4159
+              type: "object"
4160
+              x-nullable: true
4161
+      Version:
4162
+        description: "The version of the daemon"
4163
+        type: "string"
4164
+        example: "19.03.12"
4165
+      ApiVersion:
4166
+        description: |
4167
+          The default (and highest) API version that is supported by the daemon
4168
+        type: "string"
4169
+        example: "1.40"
4170
+      MinAPIVersion:
4171
+        description: |
4172
+          The minimum API version that is supported by the daemon
4173
+        type: "string"
4174
+        example: "1.12"
4175
+      GitCommit:
4176
+        description: |
4177
+          The Git commit of the source code that was used to build the daemon
4178
+        type: "string"
4179
+        example: "48a66213fe"
4180
+      GoVersion:
4181
+        description: |
4182
+          The version Go used to compile the daemon, and the version of the Go
4183
+          runtime in use.
4184
+        type: "string"
4185
+        example: "go1.13.14"
4186
+      Os:
4187
+        description: |
4188
+          The operating system that the daemon is running on ("linux" or "windows")
4189
+        type: "string"
4190
+        example: "linux"
4191
+      Arch:
4192
+        description: |
4193
+          The architecture that the daemon is running on
4194
+        type: "string"
4195
+        example: "amd64"
4196
+      KernelVersion:
4197
+        description: |
4198
+          The kernel version (`uname -r`) that the daemon is running on.
4199
+
4200
+          This field is omitted when empty.
4201
+        type: "string"
4202
+        example: "4.19.76-linuxkit"
4203
+      Experimental:
4204
+        description: |
4205
+          Indicates if the daemon is started with experimental features enabled.
4206
+
4207
+          This field is omitted when empty / false.
4208
+        type: "boolean"
4209
+        example: true
4210
+      BuildTime:
4211
+        description: |
4212
+          The date and time that the daemon was compiled.
4213
+        type: "string"
4214
+        example: "2020-06-22T15:49:27.000000000+00:00"
4215
+
4216
+
4120 4217
   SystemInfo:
4121 4218
     type: "object"
4122 4219
     properties:
... ...
@@ -7736,63 +7833,7 @@ paths:
7736 7736
         200:
7737 7737
           description: "no error"
7738 7738
           schema:
7739
-            type: "object"
7740
-            title: "SystemVersionResponse"
7741
-            properties:
7742
-              Platform:
7743
-                type: "object"
7744
-                required: [Name]
7745
-                properties:
7746
-                  Name:
7747
-                    type: "string"
7748
-              Components:
7749
-                type: "array"
7750
-                items:
7751
-                  type: "object"
7752
-                  x-go-name: ComponentVersion
7753
-                  required: [Name, Version]
7754
-                  properties:
7755
-                    Name:
7756
-                      type: "string"
7757
-                    Version:
7758
-                      type: "string"
7759
-                      x-nullable: false
7760
-                    Details:
7761
-                      type: "object"
7762
-                      x-nullable: true
7763
-
7764
-              Version:
7765
-                type: "string"
7766
-              ApiVersion:
7767
-                type: "string"
7768
-              MinAPIVersion:
7769
-                type: "string"
7770
-              GitCommit:
7771
-                type: "string"
7772
-              GoVersion:
7773
-                type: "string"
7774
-              Os:
7775
-                type: "string"
7776
-              Arch:
7777
-                type: "string"
7778
-              KernelVersion:
7779
-                type: "string"
7780
-              Experimental:
7781
-                type: "boolean"
7782
-              BuildTime:
7783
-                type: "string"
7784
-          examples:
7785
-            application/json:
7786
-              Version: "17.04.0"
7787
-              Os: "linux"
7788
-              KernelVersion: "3.19.0-23-generic"
7789
-              GoVersion: "go1.7.5"
7790
-              GitCommit: "deadbee"
7791
-              Arch: "amd64"
7792
-              ApiVersion: "1.27"
7793
-              MinAPIVersion: "1.12"
7794
-              BuildTime: "2016-06-14T07:09:13.444803460+00:00"
7795
-              Experimental: true
7739
+            $ref: "#/definitions/SystemVersion"
7796 7740
         500:
7797 7741
           description: "server error"
7798 7742
           schema: