Browse code

use swagger support for « title » as generated types names for inline schema align naming convention with x-go-name

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>

Nicolas De Loof authored on 2017/11/24 19:41:57
Showing 8 changed files
... ...
@@ -4501,6 +4501,8 @@ paths:
4501 4501
           description: "Container created successfully"
4502 4502
           schema:
4503 4503
             type: "object"
4504
+            title: "ContainerCreateResponse"
4505
+            description: "OK response to ContainerCreate operation"
4504 4506
             required: [Id, Warnings]
4505 4507
             properties:
4506 4508
               Id:
... ...
@@ -4549,6 +4551,7 @@ paths:
4549 4549
           description: "no error"
4550 4550
           schema:
4551 4551
             type: "object"
4552
+            title: "ContainerInspectResponse"
4552 4553
             properties:
4553 4554
               Id:
4554 4555
                 description: "The ID of the container"
... ...
@@ -4833,6 +4836,8 @@ paths:
4833 4833
           description: "no error"
4834 4834
           schema:
4835 4835
             type: "object"
4836
+            title: "ContainerTopResponse"
4837
+            description: "OK response to ContainerTop operation"
4836 4838
             properties:
4837 4839
               Titles:
4838 4840
                 description: "The ps column titles"
... ...
@@ -4993,6 +4998,8 @@ paths:
4993 4993
             items:
4994 4994
               type: "object"
4995 4995
               x-go-name: "ContainerChangeResponseItem"
4996
+              title: "ContainerChangeResponseItem"
4997
+              description: "change item in response to ContainerChanges operation"
4996 4998
               required: [Path, Kind]
4997 4999
               properties:
4998 5000
                 Path:
... ...
@@ -5371,6 +5378,8 @@ paths:
5371 5371
           description: "The container has been updated."
5372 5372
           schema:
5373 5373
             type: "object"
5374
+            title: "ContainerUpdateResponse"
5375
+            description: "OK response to ContainerUpdate operation"
5374 5376
             properties:
5375 5377
               Warnings:
5376 5378
                 type: "array"
... ...
@@ -5724,6 +5733,8 @@ paths:
5724 5724
           description: "The container has exit."
5725 5725
           schema:
5726 5726
             type: "object"
5727
+            title: "ContainerWaitResponse"
5728
+            description: "OK response to ContainerWait operation"
5727 5729
             required: [StatusCode]
5728 5730
             properties:
5729 5731
               StatusCode:
... ...
@@ -5969,6 +5980,7 @@ paths:
5969 5969
           description: "No error"
5970 5970
           schema:
5971 5971
             type: "object"
5972
+            title: "ContainerPruneResponse"
5972 5973
             properties:
5973 5974
               ContainersDeleted:
5974 5975
                 description: "Container IDs that were deleted"
... ...
@@ -6225,6 +6237,7 @@ paths:
6225 6225
           description: "No error"
6226 6226
           schema:
6227 6227
             type: "object"
6228
+            title: "BuildPruneResponse"
6228 6229
             properties:
6229 6230
               SpaceReclaimed:
6230 6231
                 description: "Disk space reclaimed in bytes"
... ...
@@ -6410,6 +6423,8 @@ paths:
6410 6410
             items:
6411 6411
               type: "object"
6412 6412
               x-go-name: HistoryResponseItem
6413
+              title: "HistoryResponseItem"
6414
+              description: "individual image layer information in response to ImageHistory operation"
6413 6415
               required: [Id, Created, CreatedBy, Tags, Size, Comment]
6414 6416
               properties:
6415 6417
                 Id:
... ...
@@ -6616,6 +6631,7 @@ paths:
6616 6616
             type: "array"
6617 6617
             items:
6618 6618
               type: "object"
6619
+              title: "ImageSearchResponseItem"
6619 6620
               properties:
6620 6621
                 description:
6621 6622
                   type: "string"
... ...
@@ -6691,6 +6707,7 @@ paths:
6691 6691
           description: "No error"
6692 6692
           schema:
6693 6693
             type: "object"
6694
+            title: "ImagePruneResponse"
6694 6695
             properties:
6695 6696
               ImagesDeleted:
6696 6697
                 description: "Images that were deleted"
... ...
@@ -6718,6 +6735,7 @@ paths:
6718 6718
           description: "An identity token was generated successfully."
6719 6719
           schema:
6720 6720
             type: "object"
6721
+            title: "SystemAuthResponse"
6721 6722
             required: [Status]
6722 6723
             properties:
6723 6724
               Status:
... ...
@@ -6772,6 +6790,7 @@ paths:
6772 6772
           description: "no error"
6773 6773
           schema:
6774 6774
             type: "object"
6775
+            title: "SystemVersionResponse"
6775 6776
             properties:
6776 6777
               Version:
6777 6778
                 type: "string"
... ...
@@ -6928,6 +6947,7 @@ paths:
6928 6928
           description: "no error"
6929 6929
           schema:
6930 6930
             type: "object"
6931
+            title: "SystemEventsResponse"
6931 6932
             properties:
6932 6933
               Type:
6933 6934
                 description: "The type of object emitting the event"
... ...
@@ -7011,6 +7031,7 @@ paths:
7011 7011
           description: "no error"
7012 7012
           schema:
7013 7013
             type: "object"
7014
+            title: "SystemDataUsageResponse"
7014 7015
             properties:
7015 7016
               LayersSize:
7016 7017
                 type: "integer"
... ...
@@ -7366,6 +7387,7 @@ paths:
7366 7366
           description: "No error"
7367 7367
           schema:
7368 7368
             type: "object"
7369
+            title: "ExecInspectResponse"
7369 7370
             properties:
7370 7371
               CanRemove:
7371 7372
                 type: "boolean"
... ...
@@ -7436,6 +7458,7 @@ paths:
7436 7436
           description: "Summary volume data that matches the query"
7437 7437
           schema:
7438 7438
             type: "object"
7439
+            title: "VolumeListResponse"
7439 7440
             required: [Volumes, Warnings]
7440 7441
             properties:
7441 7442
               Volumes:
... ...
@@ -7617,6 +7640,7 @@ paths:
7617 7617
           description: "No error"
7618 7618
           schema:
7619 7619
             type: "object"
7620
+            title: "VolumePruneResponse"
7620 7621
             properties:
7621 7622
               VolumesDeleted:
7622 7623
                 description: "Volumes that were deleted"
... ...
@@ -7795,6 +7819,7 @@ paths:
7795 7795
           description: "No error"
7796 7796
           schema:
7797 7797
             type: "object"
7798
+            title: "NetworkCreateResponse"
7798 7799
             properties:
7799 7800
               Id:
7800 7801
                 description: "The ID of the created network."
... ...
@@ -7997,6 +8022,7 @@ paths:
7997 7997
           description: "No error"
7998 7998
           schema:
7999 7999
             type: "object"
8000
+            title: "NetworkPruneResponse"
8000 8001
             properties:
8001 8002
               NetworksDeleted:
8002 8003
                 description: "Networks that were deleted"
... ...
@@ -8048,6 +8074,7 @@ paths:
8048 8048
             items:
8049 8049
               description: "Describes a permission the user has to accept upon installing the plugin."
8050 8050
               type: "object"
8051
+              title: "PluginPrivilegeItem"
8051 8052
               properties:
8052 8053
                 Name:
8053 8054
                   type: "string"
... ...
@@ -8750,6 +8777,7 @@ paths:
8750 8750
           description: "no error"
8751 8751
           schema:
8752 8752
             type: "object"
8753
+            title: "UnlockKeyResponse"
8753 8754
             properties:
8754 8755
               UnlockKey:
8755 8756
                 description: "The swarm's unlock key."
... ...
@@ -8841,6 +8869,7 @@ paths:
8841 8841
           description: "no error"
8842 8842
           schema:
8843 8843
             type: "object"
8844
+            title: "ServiceCreateResponse"
8844 8845
             properties:
8845 8846
               ID:
8846 8847
                 description: "The ID of the created service."
... ...
@@ -9857,6 +9886,7 @@ paths:
9857 9857
           schema:
9858 9858
             type: "object"
9859 9859
             x-go-name: DistributionInspect
9860
+            title: "DistributionInspectResponse"
9860 9861
             required: [Descriptor, Platforms]
9861 9862
             properties:
9862 9863
               Descriptor:
... ...
@@ -20,7 +20,7 @@ import (
20 20
 
21 21
 
22 22
 {{ range .ExtraSchemas }}
23
-// {{ .Name }} {{ template "docstring" . }}
23
+// {{ .Name }} {{ comment .Description }}
24 24
 // swagger:model {{ .Name }}
25 25
 {{ template "schema" . }}
26 26
 {{ end }}
... ...
@@ -7,7 +7,7 @@ package container
7 7
 // See hack/generate-swagger-api.sh
8 8
 // ----------------------------------------------------------------------------
9 9
 
10
-// ContainerChangeResponseItem container change response item
10
+// ContainerChangeResponseItem change item in response to ContainerChanges operation
11 11
 // swagger:model ContainerChangeResponseItem
12 12
 type ContainerChangeResponseItem struct {
13 13
 
... ...
@@ -7,7 +7,7 @@ package container
7 7
 // See hack/generate-swagger-api.sh
8 8
 // ----------------------------------------------------------------------------
9 9
 
10
-// ContainerCreateCreatedBody container create created body
10
+// ContainerCreateCreatedBody OK response to ContainerCreate operation
11 11
 // swagger:model ContainerCreateCreatedBody
12 12
 type ContainerCreateCreatedBody struct {
13 13
 
... ...
@@ -7,7 +7,7 @@ package container
7 7
 // See hack/generate-swagger-api.sh
8 8
 // ----------------------------------------------------------------------------
9 9
 
10
-// ContainerTopOKBody container top o k body
10
+// ContainerTopOKBody OK response to ContainerTop operation
11 11
 // swagger:model ContainerTopOKBody
12 12
 type ContainerTopOKBody struct {
13 13
 
... ...
@@ -7,7 +7,7 @@ package container
7 7
 // See hack/generate-swagger-api.sh
8 8
 // ----------------------------------------------------------------------------
9 9
 
10
-// ContainerUpdateOKBody container update o k body
10
+// ContainerUpdateOKBody OK response to ContainerUpdate operation
11 11
 // swagger:model ContainerUpdateOKBody
12 12
 type ContainerUpdateOKBody struct {
13 13
 
... ...
@@ -15,7 +15,7 @@ type ContainerWaitOKBodyError struct {
15 15
 	Message string `json:"Message,omitempty"`
16 16
 }
17 17
 
18
-// ContainerWaitOKBody container wait o k body
18
+// ContainerWaitOKBody OK response to ContainerWait operation
19 19
 // swagger:model ContainerWaitOKBody
20 20
 type ContainerWaitOKBody struct {
21 21
 
... ...
@@ -7,7 +7,7 @@ package image
7 7
 // See hack/generate-swagger-api.sh
8 8
 // ----------------------------------------------------------------------------
9 9
 
10
-// HistoryResponseItem history response item
10
+// HistoryResponseItem individual image layer information in response to ImageHistory operation
11 11
 // swagger:model HistoryResponseItem
12 12
 type HistoryResponseItem struct {
13 13