dynamic-html: refactor parameters view

This commit is contained in:
Josh Ponelat 2015-05-15 09:25:24 +02:00
parent 0248d6fd9f
commit 3bc319d534
6 changed files with 259 additions and 150 deletions

View File

@ -151,15 +151,31 @@
padding-top: 20px;
}
.param {
li.parameter {
list-style: none;
display: block;
float: left;
width: 220px;
clear: left;
padding-left: 1em;
}
.param{
display: block;
}
.param-name {
margin-left: 1em;
}
.param-in {
font-weight: bold;
font-size: 1.1em;
}
.param-type {
margin-left: 1em;
font-style: italic;
}
.param-description {
float: left;
display: block;
font-family: 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif;
}
@ -289,4 +305,4 @@
.top-bar ul#nav:hover li {
border-color: #222222;
}
}

View File

@ -17,36 +17,19 @@
<h3 class="section">Parameters</h3>
<ul>
{{#allParams}}
<div class="parameter">
{{#isContainer}}
{{#complexType}}
<!-- container / complex -->
{{/complexType}}
{{#simpleType}}
<!-- container / simple -->
<div class="param">{{paramName}}&nbsp;:&nbsp;{{dataType}}&nbsp;({{type}})</div>
<span>{{#optional}}optional{{/optional}}</span>
</div>
{{/simpleType}}
{{/isContainer}}
{{#isNotContainer}}
{{#simpleType}}
<!-- not container / simple -->
<div class="param">{{paramName}}&nbsp;:&nbsp;{{dataType}}&nbsp;({{type}})</div>
<span>{{#optional}}optional{{/optional}}</span>
</div>
{{/simpleType}}
{{/isNotContainer}}
{{#foo}}
<div class="param">{{paramName}}&nbsp;:&nbsp;{{#complexType}}&nbsp;<div class="model" id="{{complexType}}"><a href="#">{{dataType}}</a>{{/complexType}}{{#simpleType}}{{dataType}}{{/simpleType}}&nbsp;({{type}})</div>
<span>{{#optional}}optional{{/optional}}</span>
</div>
{{/foo}}
<p class="param-description">{{description}}</p>
</div>
<li class="parameter">
{{#isFormParam}}<span class="param-in">Form: </span>{{/isFormParam}}
{{#isQueryParam}}<span class="param-in">Query: </span>{{/isQueryParam}}
{{#isPathParam}}<span class="param-in">Path: </span>{{/isPathParam}}
{{#isHeaderParam}}<span class="param-in">Header: </span>{{/isHeaderParam}}
{{#isBodyParam}}<span class="param-in">Body: </span>{{/isBodyParam}}
<span class="param-name">{{paramName}}</span>
<span class="param-type">{{dataType}}{{#baseType}}({{baseType}}){{/baseType}}</span>
{{#optional}}<span class="param-optional-flag">(optional)</span>{{/optional}}
<p class="param-description">{{description}}</p>
</li>
{{/allParams}}
</ul>
{{/operation}}
{{/operations}}
</div>
</div>

View File

@ -151,15 +151,31 @@
padding-top: 20px;
}
.param {
li.parameter {
list-style: none;
display: block;
float: left;
width: 220px;
clear: left;
padding-left: 1em;
}
.param{
display: block;
}
.param-name {
margin-left: 1em;
}
.param-in {
font-weight: bold;
font-size: 1.1em;
}
.param-type {
margin-left: 1em;
font-style: italic;
}
.param-description {
float: left;
display: block;
font-family: 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif;
}
@ -289,4 +305,4 @@
.top-bar ul#nav:hover li {
border-color: #222222;
}
}

View File

@ -17,13 +17,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<p class="param-description">Pet object that needs to be added to the store</p>
</div>
<span class="param-in">Body: </span>
<span class="param-name">body</span>
<span class="param-type">Pet</span>
<p class="param-description">Pet object that needs to be added to the store</p>
</li>
</ul>
@ -40,13 +44,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<p class="param-description">Pet object that needs to be added to the store</p>
</div>
<span class="param-in">Body: </span>
<span class="param-name">body</span>
<span class="param-type">Pet</span>
<p class="param-description">Pet object that needs to be added to the store</p>
</li>
</ul>
@ -63,13 +71,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Query: </span>
<p class="param-description">Status values that need to be considered for filter</p>
</div>
<span class="param-name">status</span>
<span class="param-type">List(String)</span>
<p class="param-description">Status values that need to be considered for filter</p>
</li>
</ul>
@ -86,13 +98,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Query: </span>
<p class="param-description">Tags to filter by</p>
</div>
<span class="param-name">tags</span>
<span class="param-type">List(String)</span>
<p class="param-description">Tags to filter by</p>
</li>
</ul>
@ -109,13 +125,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">ID of pet that needs to be fetched</p>
</div>
<span class="param-name">petId</span>
<span class="param-type">Long</span>
<p class="param-description">ID of pet that needs to be fetched</p>
</li>
</ul>
@ -132,29 +152,41 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">ID of pet that needs to be updated</p>
</div>
<span class="param-name">petId</span>
<span class="param-type">String</span>
<p class="param-description">ID of pet that needs to be updated</p>
</li>
<div class="parameter">
<li class="parameter">
<span class="param-in">Form: </span>
<p class="param-description">Updated name of the pet</p>
</div>
<span class="param-name">name</span>
<span class="param-type">String</span>
<p class="param-description">Updated name of the pet</p>
</li>
<div class="parameter">
<li class="parameter">
<span class="param-in">Form: </span>
<p class="param-description">Updated status of the pet</p>
</div>
<span class="param-name">status</span>
<span class="param-type">String</span>
<p class="param-description">Updated status of the pet</p>
</li>
</ul>
@ -171,21 +203,29 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<p class="param-description"></p>
</div>
<span class="param-in">Header: </span>
<span class="param-name">api_key</span>
<span class="param-type">String</span>
<p class="param-description"></p>
</li>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">Pet id to delete</p>
</div>
<span class="param-name">petId</span>
<span class="param-type">Long</span>
<p class="param-description">Pet id to delete</p>
</li>
</ul>
@ -202,31 +242,43 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">ID of pet to update</p>
</div>
<span class="param-name">petId</span>
<span class="param-type">Long</span>
<p class="param-description">ID of pet to update</p>
</li>
<div class="parameter">
<li class="parameter">
<span class="param-in">Form: </span>
<p class="param-description">Additional data to pass to server</p>
</div>
<span class="param-name">additionalMetadata</span>
<span class="param-type">String</span>
<p class="param-description">Additional data to pass to server</p>
</li>
<div class="parameter">
<li class="parameter">
<span class="param-in">Form: </span>
<p class="param-description">file to upload</p>
</div>
<span class="param-name">file</span>
<span class="param-type">file</span>
<p class="param-description">file to upload</p>
</li>
</ul>
</div>
</div>

View File

@ -32,13 +32,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<p class="param-description">order placed for purchasing the pet</p>
</div>
<span class="param-in">Body: </span>
<span class="param-name">body</span>
<span class="param-type">Order</span>
<p class="param-description">order placed for purchasing the pet</p>
</li>
</ul>
@ -55,13 +59,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">ID of pet that needs to be fetched</p>
</div>
<span class="param-name">orderId</span>
<span class="param-type">String</span>
<p class="param-description">ID of pet that needs to be fetched</p>
</li>
</ul>
@ -78,15 +86,19 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">ID of the order that needs to be deleted</p>
</div>
<span class="param-name">orderId</span>
<span class="param-type">String</span>
<p class="param-description">ID of the order that needs to be deleted</p>
</li>
</ul>
</div>
</div>

View File

@ -17,13 +17,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<p class="param-description">Created user object</p>
</div>
<span class="param-in">Body: </span>
<span class="param-name">body</span>
<span class="param-type">User</span>
<p class="param-description">Created user object</p>
</li>
</ul>
@ -40,16 +44,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<p class="param-description">List of user object</p>
</div>
<span class="param-in">Body: </span>
<span class="param-name">body</span>
<span class="param-type">List</span>
<p class="param-description">List of user object</p>
</li>
</ul>
@ -66,16 +71,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<p class="param-description">List of user object</p>
</div>
<span class="param-in">Body: </span>
<span class="param-name">body</span>
<span class="param-type">List</span>
<p class="param-description">List of user object</p>
</li>
</ul>
@ -92,21 +98,29 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Query: </span>
<p class="param-description">The user name for login</p>
</div>
<span class="param-name">username</span>
<span class="param-type">String</span>
<p class="param-description">The user name for login</p>
</li>
<div class="parameter">
<li class="parameter">
<span class="param-in">Query: </span>
<p class="param-description">The password for login in clear text</p>
</div>
<span class="param-name">password</span>
<span class="param-type">String</span>
<p class="param-description">The password for login in clear text</p>
</li>
</ul>
@ -138,13 +152,17 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">The name that needs to be fetched. Use user1 for testing. </p>
</div>
<span class="param-name">username</span>
<span class="param-type">String</span>
<p class="param-description">The name that needs to be fetched. Use user1 for testing. </p>
</li>
</ul>
@ -161,21 +179,29 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">name that need to be deleted</p>
</div>
<span class="param-name">username</span>
<span class="param-type">String</span>
<p class="param-description">name that need to be deleted</p>
</li>
<div class="parameter">
<li class="parameter">
<p class="param-description">Updated user object</p>
</div>
<span class="param-in">Body: </span>
<span class="param-name">body</span>
<span class="param-type">User</span>
<p class="param-description">Updated user object</p>
</li>
</ul>
@ -192,15 +218,19 @@
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<li class="parameter">
<span class="param-in">Path: </span>
<p class="param-description">The name that needs to be deleted</p>
</div>
<span class="param-name">username</span>
<span class="param-type">String</span>
<p class="param-description">The name that needs to be deleted</p>
</li>
</ul>
</div>
</div>