Skip to content

Commit

Permalink
Add containerPort to service schema. Regenerate HTML. Add instruction…
Browse files Browse the repository at this point in the history
…s for how to view HTML.
  • Loading branch information
bgrant0607 committed Aug 20, 2014
1 parent 7ac44a6 commit 31a0daa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,16 @@ git fetch upstream
git rebase upstream/master
```

### Regenerating the documentation
### Regenerating the API documentation

```
cd kubernetes/api
sudo docker build -t kubernetes/raml2html .
sudo docker run --name="docgen" kubernetes/raml2html
sudo docker cp docgen:/data/kubernetes.html .
```

View the API documentation using htmlpreview (works on your fork, too):
```
http://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/blob/master/api/kubernetes.html
```
4 changes: 4 additions & 0 deletions api/doc/service-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"type": "number",
"required": false
},
"containerPort": {
"type": "string",
"required": false
},
"labels": {
"type": "object",
"required": false
Expand Down
16 changes: 12 additions & 4 deletions api/kubernetes.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"name": "foo"
}
}

</code></pre></small></p></div></div></div></div></div></div></div><div class="panel panel-white"><div class=panel-heading><h4 class=panel-title><a class=collapsed data-toggle=collapse href=#panel__pods__podId_><span class=parent>/pods</span>/{podId}</a> <span class=methods><a href=# data-toggle=modal data-target=#_pods__podId__get><span class="badge badge_get">get</span></a> <a href=# data-toggle=modal data-target=#_pods__podId__put><span class="badge badge_put">put</span></a> <a href=# data-toggle=modal data-target=#_pods__podId__delete><span class="badge badge_delete">delete</span></a></span></h4></div><div id=panel__pods__podId_ class="panel-collapse collapse"><div class=panel-body><div class=list-group><a href=# data-toggle=modal data-target=#_pods__podId__get class=list-group-item><span class="badge badge_get">get</span><div class=method_description><p>Get a specific pod</p></div><div class=clearfix></div></a> <a href=# data-toggle=modal data-target=#_pods__podId__put class=list-group-item><span class="badge badge_put">put</span><div class=method_description><p>Update a pod</p></div><div class=clearfix></div></a> <a href=# data-toggle=modal data-target=#_pods__podId__delete class=list-group-item><span class="badge badge_delete">delete</span><div class=method_description><p>Delete a specific pod</p></div><div class=clearfix></div></a></div></div></div><div class="modal fade" tabindex=0 id=_pods__podId__get><div class=modal-dialog><div class=modal-content><div class=modal-header><button type=button class=close data-dismiss=modal aria-hidden=true>&times;</button><h4 class=modal-title id=myModalLabel><span class="badge badge_get">get</span> <span class=parent>/pods</span>/{podId}</h4></div><div class=modal-body><div class="alert alert-info"><p>Get a specific pod</p></div><ul class="nav nav-tabs"><li class=active><a href=#_pods__podId__get_request data-toggle=tab>Request</a></li><li><a href=#_pods__podId__get_response data-toggle=tab>Response</a></li></ul><div class=tab-content><div class="tab-pane active" id=_pods__podId__get_request><h3>URI Parameters</h3><ul><li><strong>podId</strong>: <em>required (string)</em></li></ul></div><div class=tab-pane id=_pods__podId__get_response><h2>HTTP status code <a href=http://httpstatus.es/200 target=_blank>200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><small><strong>Example</strong>:<pre><code>{
"kind": "Pod",
"apiVersion": "v1beta1",
Expand Down Expand Up @@ -311,7 +311,7 @@
"name": "foo"
}
}

</code></pre></small></p></div></div></div></div></div></div><div class="modal fade" tabindex=0 id=_pods__podId__put><div class=modal-dialog><div class=modal-content><div class=modal-header><button type=button class=close data-dismiss=modal aria-hidden=true>&times;</button><h4 class=modal-title id=myModalLabel><span class="badge badge_put">put</span> <span class=parent>/pods</span>/{podId}</h4></div><div class=modal-body><div class="alert alert-info"><p>Update a pod</p></div><ul class="nav nav-tabs"><li class=active><a href=#_pods__podId__put_request data-toggle=tab>Request</a></li></ul><div class=tab-content><div class="tab-pane active" id=_pods__podId__put_request><h3>URI Parameters</h3><ul><li><strong>podId</strong>: <em>required (string)</em></li></ul><h3>Body</h3><p><strong>Type: application/json</strong></p><p><small><strong>Schema</strong>:<pre><code>{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
Expand Down Expand Up @@ -430,7 +430,7 @@
"name": "foo"
}
}

</code></pre></small></p></div></div></div></div></div></div><div class="modal fade" tabindex=0 id=_pods__podId__delete><div class=modal-dialog><div class=modal-content><div class=modal-header><button type=button class=close data-dismiss=modal aria-hidden=true>&times;</button><h4 class=modal-title id=myModalLabel><span class="badge badge_delete">delete</span> <span class=parent>/pods</span>/{podId}</h4></div><div class=modal-body><div class="alert alert-info"><p>Delete a specific pod</p></div><ul class="nav nav-tabs"><li class=active><a href=#_pods__podId__delete_request data-toggle=tab>Request</a></li><li><a href=#_pods__podId__delete_response data-toggle=tab>Response</a></li></ul><div class=tab-content><div class="tab-pane active" id=_pods__podId__delete_request><h3>URI Parameters</h3><ul><li><strong>podId</strong>: <em>required (string)</em></li></ul></div><div class=tab-pane id=_pods__podId__delete_response><h2>HTTP status code <a href=http://httpstatus.es/200 target=_blank>200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><small><strong>Example</strong>:<pre><code>{
"success": true
}
Expand Down Expand Up @@ -699,6 +699,10 @@
"type": "number",
"required": false
},
"containerPort": {
"type": "string",
"required": false
},
"labels": {
"type": "object",
"required": false
Expand Down Expand Up @@ -763,6 +767,10 @@
"type": "number",
"required": false
},
"containerPort": {
"type": "string",
"required": false
},
"labels": {
"type": "object",
"required": false
Expand All @@ -788,4 +796,4 @@
</code></pre></small></p></div></div></div></div></div></div><div class="modal fade" tabindex=0 id=_services__serviceId__delete><div class=modal-dialog><div class=modal-content><div class=modal-header><button type=button class=close data-dismiss=modal aria-hidden=true>&times;</button><h4 class=modal-title id=myModalLabel><span class="badge badge_delete">delete</span> <span class=parent>/services</span>/{serviceId}</h4></div><div class=modal-body><div class="alert alert-info"><p>Delete a specific service</p></div><ul class="nav nav-tabs"><li class=active><a href=#_services__serviceId__delete_request data-toggle=tab>Request</a></li><li><a href=#_services__serviceId__delete_response data-toggle=tab>Response</a></li></ul><div class=tab-content><div class="tab-pane active" id=_services__serviceId__delete_request><h3>URI Parameters</h3><ul><li><strong>serviceId</strong>: <em>required (string)</em></li></ul></div><div class=tab-pane id=_services__serviceId__delete_response><h2>HTTP status code <a href=http://httpstatus.es/200 target=_blank>200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><small><strong>Example</strong>:<pre><code>{
"success": true
}
</code></pre></small></p></div></div></div></div></div></div></div></div></div></div></div><div class=col-md-3><div id=sidebar class="hidden-print affix" role=complementary><ul class="nav nav-pills nav-stacked"><li><a href=#_pods>/pods</a></li><li><a href=#_replicationControllers>/replicationControllers</a></li><li><a href=#_services>/services</a></li></ul></div></div></div></div></body></html>
</code></pre></small></p></div></div></div></div></div></div></div></div></div></div></div><div class=col-md-3><div id=sidebar class="hidden-print affix" role=complementary><ul class="nav nav-pills nav-stacked"><li><a href=#_pods>/pods</a></li><li><a href=#_replicationControllers>/replicationControllers</a></li><li><a href=#_services>/services</a></li></ul></div></div></div></div></body></html>

0 comments on commit 31a0daa

Please sign in to comment.