Browse code

Add display name for tags in swagger.yaml

In #29071, we made the tags the correct name for generating types,
at the expense of the menu in the documentation looking good.

ReDoc now has support for tag display names
( https://github.com/Rebilly/ReDoc/pull/152 ), so we can assign
a more human-friendly name to the menu items.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
(cherry picked from commit 0caa6c218c89147b2d61a1bbb87c48ad16495a11)
Signed-off-by: Victor Vieux <vieux@docker.com>

Ben Firshman authored on 2016/12/14 21:00:04
Showing 1 changed files
... ...
@@ -97,37 +97,49 @@ info:
97 97
 tags:
98 98
   # Primary objects
99 99
   - name: "Container"
100
+    x-displayName: "Containers"
100 101
     description: |
101 102
       Create and manage containers.
102 103
   - name: "Image"
104
+    x-displayName: "Images"
103 105
   - name: "Network"
106
+    x-displayName: "Networks"
104 107
     description: |
105 108
       Networks are user-defined networks that containers can be attached to. See the [networking documentation](https://docs.docker.com/engine/userguide/networking/) for more information.
106 109
   - name: "Volume"
110
+    x-displayName: "Volumes"
107 111
     description: |
108 112
       Create and manage persistent storage that can be attached to containers.
109 113
   - name: "Exec"
114
+    x-displayName: "Exec"
110 115
     description: |
111 116
       Run new commands inside running containers. See the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information.
112 117
 
113 118
       To exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, `docker exec`.
114 119
   - name: "Secret"
120
+    x-displayName: "Secrets"
115 121
   # Swarm things
116 122
   - name: "Swarm"
123
+    x-displayName: "Swarm"
117 124
     description: |
118 125
       Engines can be clustered together in a swarm. See [the swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information.
119 126
   - name: "Node"
127
+    x-displayName: "Nodes"
120 128
     description: |
121 129
       Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work.
122 130
   - name: "Service"
131
+    x-displayName: "Services"
123 132
     description: |
124 133
       Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work.
125 134
   - name: "Task"
135
+    x-displayName: "Tasks"
126 136
     description: |
127 137
       A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work.
128 138
   # System things
129 139
   - name: "Plugin"
140
+    x-displayName: "Plugins"
130 141
   - name: "System"
142
+    x-displayName: "System"
131 143
 
132 144
 definitions:
133 145
   Port: