updated samples

This commit is contained in:
Tony Tam
2014-12-03 00:55:38 -08:00
parent 96ea15a4d0
commit 6e858ee645
21 changed files with 819 additions and 114 deletions

27
bin/dynamic-html.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/sh
SCRIPT="$0"
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DIR}"; pwd`
fi
cd $APP_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ com.wordnik.swagger.codegen.Codegen -i http://petstore.swagger.wordnik.com/v2/swagger.json -l dynamic-html -o samples/swagger-dynamic-html"
java -cp $APP_DIR/target/*:$APP_DIR/target/lib/* $ags

View File

@@ -22,6 +22,6 @@ cd $APP_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ com.wordnik.swagger.codegen.Codegen -i http://petstore.swagger.wordnik.com/v2/swagger.json -l static -o samples/swagger-static-docs"
ags="$@ com.wordnik.swagger.codegen.Codegen -i http://petstore.swagger.wordnik.com/v2/swagger.json -l html -o samples/swagger-html"
java -cp $APP_DIR/target/*:$APP_DIR/target/lib/* $ags

View File

@@ -31,46 +31,6 @@
</div>
<div class="section-box">
<div class="section-header">
<a href="#!/StoreApi">StoreApi</a>
</div>
<ul>
<li><a href="#!/StoreApi#placeOrder">placeOrder</a></li>
<li><a href="#!/StoreApi#getOrderById">getOrderById</a></li>
<li><a href="#!/StoreApi#deleteOrder">deleteOrder</a></li>
</ul>
</div>
<div class="section-box">
<div class="section-header">
<a href="#!/PetApi">PetApi</a>
</div>
<ul>
<li><a href="#!/PetApi#updatePet">updatePet</a></li>
<li><a href="#!/PetApi#addPet">addPet</a></li>
<li><a href="#!/PetApi#findPetsByStatus">findPetsByStatus</a></li>
<li><a href="#!/PetApi#findPetsByTags">findPetsByTags</a></li>
<li><a href="#!/PetApi#getPetById">getPetById</a></li>
<li><a href="#!/PetApi#deletePet">deletePet</a></li>
</ul>
</div>
<div class="section-box">
<div class="section-header">
<a href="#!/UserApi">UserApi</a>
@@ -98,6 +58,48 @@
</ul>
</div>
<div class="section-box">
<div class="section-header">
<a href="#!/PetApi">PetApi</a>
</div>
<ul>
<li><a href="#!/PetApi#updatePet">updatePet</a></li>
<li><a href="#!/PetApi#addPet">addPet</a></li>
<li><a href="#!/PetApi#findPetsByStatus">findPetsByStatus</a></li>
<li><a href="#!/PetApi#findPetsByTags">findPetsByTags</a></li>
<li><a href="#!/PetApi#getPetById">getPetById</a></li>
<li><a href="#!/PetApi#updatePetWithForm">updatePetWithForm</a></li>
<li><a href="#!/PetApi#deletePet">deletePet</a></li>
</ul>
</div>
<div class="section-box">
<div class="section-header">
<a href="#!/StoreApi">StoreApi</a>
</div>
<ul>
<li><a href="#!/StoreApi#placeOrder">placeOrder</a></li>
<li><a href="#!/StoreApi#getOrderById">getOrderById</a></li>
<li><a href="#!/StoreApi#deleteOrder">deleteOrder</a></li>
</ul>
</div>
</div>
<div class="non-sidebar">

View File

@@ -14,13 +14,13 @@
</ul>
<ul class="parameter">
<li class="param-required-false">name : String
<li class="param-required-true">name : String
<br/>
</li>
</ul>
<ul class="parameter">
<li class="param-required-false">photoUrls : List
<li class="param-required-true">photoUrls : List
<br/>
</li>
</ul>

View File

@@ -9,7 +9,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/pet</code>
<code>http://petstore.swagger.wordnik.com/v2/pet</code>
<h3 class="section">HTTP Method</h3>
<code>PUT</code>
<h3 class="section">Response Type</h3>
@@ -18,9 +18,10 @@
<ul>
<div class="parameter">
<div class="param">body&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">Pet object that needs to be added to the store</p>
</div>
@@ -31,7 +32,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/pet</code>
<code>http://petstore.swagger.wordnik.com/v2/pet</code>
<h3 class="section">HTTP Method</h3>
<code>POST</code>
<h3 class="section">Response Type</h3>
@@ -40,9 +41,10 @@
<ul>
<div class="parameter">
<div class="param">body&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">Pet object that needs to be added to the store</p>
</div>
@@ -53,7 +55,7 @@
<p></p>
<p>Multiple status values can be provided with comma seperated strings</p>
<h3 class="section">URL</h3>
<code>/pet/findByStatus</code>
<code>http://petstore.swagger.wordnik.com/v2/pet/findByStatus</code>
<h3 class="section">HTTP Method</h3>
<code>GET</code>
<h3 class="section">Response Type</h3>
@@ -62,9 +64,10 @@
<ul>
<div class="parameter">
<div class="param">status&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">Status values that need to be considered for filter</p>
</div>
@@ -75,7 +78,7 @@
<p></p>
<p>Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.</p>
<h3 class="section">URL</h3>
<code>/pet/findByTags</code>
<code>http://petstore.swagger.wordnik.com/v2/pet/findByTags</code>
<h3 class="section">HTTP Method</h3>
<code>GET</code>
<h3 class="section">Response Type</h3>
@@ -84,9 +87,10 @@
<ul>
<div class="parameter">
<div class="param">tags&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">Tags to filter by</p>
</div>
@@ -97,7 +101,7 @@
<p></p>
<p>Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions</p>
<h3 class="section">URL</h3>
<code>/pet/{petId}</code>
<code>http://petstore.swagger.wordnik.com/v2/pet/{petId}</code>
<h3 class="section">HTTP Method</h3>
<code>GET</code>
<h3 class="section">Response Type</h3>
@@ -106,20 +110,60 @@
<ul>
<div class="parameter">
<div class="param">petId&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">ID of pet that needs to be fetched</p>
</div>
</ul>
<h2><a name="updatePetWithForm"></a>updatePetWithForm</h2>
<hr>
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>http://petstore.swagger.wordnik.com/v2/pet/{petId}</code>
<h3 class="section">HTTP Method</h3>
<code>POST</code>
<h3 class="section">Response Type</h3>
<div class="model" id=""><a href="#"></a></div>
<h3 class="section">Parameters</h3>
<ul>
<div class="parameter">
<p class="param-description">ID of pet that needs to be updated</p>
</div>
<div class="parameter">
<p class="param-description">Updated name of the pet</p>
</div>
<div class="parameter">
<p class="param-description">Updated status of the pet</p>
</div>
</ul>
<h2><a name="deletePet"></a>deletePet</h2>
<hr>
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/pet/{petId}</code>
<code>http://petstore.swagger.wordnik.com/v2/pet/{petId}</code>
<h3 class="section">HTTP Method</h3>
<code>DELETE</code>
<h3 class="section">Response Type</h3>
@@ -128,9 +172,18 @@
<ul>
<div class="parameter">
<div class="param">petId&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
<p class="param-description"></p>
</div>
<div class="parameter">
<p class="param-description">Pet id to delete</p>
</div>

View File

@@ -9,7 +9,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/store/order</code>
<code>http://petstore.swagger.wordnik.com/v2/store/order</code>
<h3 class="section">HTTP Method</h3>
<code>POST</code>
<h3 class="section">Response Type</h3>
@@ -18,9 +18,10 @@
<ul>
<div class="parameter">
<div class="param">body&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">order placed for purchasing the pet</p>
</div>
@@ -31,7 +32,7 @@
<p></p>
<p>For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions</p>
<h3 class="section">URL</h3>
<code>/store/order/{orderId}</code>
<code>http://petstore.swagger.wordnik.com/v2/store/order/{orderId}</code>
<h3 class="section">HTTP Method</h3>
<code>GET</code>
<h3 class="section">Response Type</h3>
@@ -40,9 +41,10 @@
<ul>
<div class="parameter">
<div class="param">orderId&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">ID of pet that needs to be fetched</p>
</div>
@@ -53,7 +55,7 @@
<p></p>
<p>For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors</p>
<h3 class="section">URL</h3>
<code>/store/order/{orderId}</code>
<code>http://petstore.swagger.wordnik.com/v2/store/order/{orderId}</code>
<h3 class="section">HTTP Method</h3>
<code>DELETE</code>
<h3 class="section">Response Type</h3>
@@ -62,9 +64,10 @@
<ul>
<div class="parameter">
<div class="param">orderId&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">ID of the order that needs to be deleted</p>
</div>

View File

@@ -9,7 +9,7 @@
<p></p>
<p>This can only be done by the logged in user.</p>
<h3 class="section">URL</h3>
<code>/user</code>
<code>http://petstore.swagger.wordnik.com/v2/user</code>
<h3 class="section">HTTP Method</h3>
<code>POST</code>
<h3 class="section">Response Type</h3>
@@ -18,9 +18,10 @@
<ul>
<div class="parameter">
<div class="param">body&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">Created user object</p>
</div>
@@ -31,7 +32,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/user/createWithArray</code>
<code>http://petstore.swagger.wordnik.com/v2/user/createWithArray</code>
<h3 class="section">HTTP Method</h3>
<code>POST</code>
<h3 class="section">Response Type</h3>
@@ -40,9 +41,13 @@
<ul>
<div class="parameter">
<div class="param">body&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">List of user object</p>
</div>
@@ -53,7 +58,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/user/createWithList</code>
<code>http://petstore.swagger.wordnik.com/v2/user/createWithList</code>
<h3 class="section">HTTP Method</h3>
<code>POST</code>
<h3 class="section">Response Type</h3>
@@ -62,9 +67,13 @@
<ul>
<div class="parameter">
<div class="param">body&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">List of user object</p>
</div>
@@ -75,7 +84,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/user/login</code>
<code>http://petstore.swagger.wordnik.com/v2/user/login</code>
<h3 class="section">HTTP Method</h3>
<code>GET</code>
<h3 class="section">Response Type</h3>
@@ -84,16 +93,18 @@
<ul>
<div class="parameter">
<div class="param">username&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">The user name for login</p>
</div>
<div class="parameter">
<div class="param">password&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">The password for login in clear text</p>
</div>
@@ -104,7 +115,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/user/logout</code>
<code>http://petstore.swagger.wordnik.com/v2/user/logout</code>
<h3 class="section">HTTP Method</h3>
<code>GET</code>
<h3 class="section">Response Type</h3>
@@ -119,7 +130,7 @@
<p></p>
<p></p>
<h3 class="section">URL</h3>
<code>/user/{username}</code>
<code>http://petstore.swagger.wordnik.com/v2/user/{username}</code>
<h3 class="section">HTTP Method</h3>
<code>GET</code>
<h3 class="section">Response Type</h3>
@@ -128,9 +139,10 @@
<ul>
<div class="parameter">
<div class="param">username&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">The name that needs to be fetched. Use user1 for testing. </p>
</div>
@@ -141,7 +153,7 @@
<p></p>
<p>This can only be done by the logged in user.</p>
<h3 class="section">URL</h3>
<code>/user/{username}</code>
<code>http://petstore.swagger.wordnik.com/v2/user/{username}</code>
<h3 class="section">HTTP Method</h3>
<code>PUT</code>
<h3 class="section">Response Type</h3>
@@ -150,16 +162,18 @@
<ul>
<div class="parameter">
<div class="param">username&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">name that need to be deleted</p>
</div>
<div class="parameter">
<div class="param">body&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">Updated user object</p>
</div>
@@ -170,7 +184,7 @@
<p></p>
<p>This can only be done by the logged in user.</p>
<h3 class="section">URL</h3>
<code>/user/{username}</code>
<code>http://petstore.swagger.wordnik.com/v2/user/{username}</code>
<h3 class="section">HTTP Method</h3>
<code>DELETE</code>
<h3 class="section">Response Type</h3>
@@ -179,9 +193,10 @@
<ul>
<div class="parameter">
<div class="param">username&nbsp;:&nbsp;&nbsp;()</div>
<span></span>
</div>
<p class="param-description">The name that needs to be deleted</p>
</div>

View File

@@ -0,0 +1,605 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>API Reference</title>
<link rel="stylesheet" type="text/css" href="site.css" media="screen" />
</head>
<body>
<h1>Swagger Petstore</h1>
<div class="app-desc">This is a sample server Petstore server. You can find out more about Swagger at <a href="http://swagger.wordnik.com">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key "special-key" to test the authorization filters for our Partner</div>
<div class="app-desc">Contact Info: <a href="hello@helloreverb.com">hello@helloreverb.com</a></div>
<div class="license-info">Apache 2.0</div>
<div class="license-url">http://www.apache.org/licenses/LICENSE-2.0.html</div>
<h2>Access</h2>
<div class="method-summary">Access to the API requires an api key to be provided by our Partner for all requests. The api key is passed as a header with the name `api_key` and the value provided by Reverb Technologies, Inc. Unless otherwise agreed upon, access to the Reverb API is intended solely for usage by our Partner and not third parties.</div>
<h2>Methods</h2>
<div class="method">
<div class="method-path"><pre class="post"><code class="huge"><span>post</span>: /user</code></pre></div>
<div class="method-summary"><span class="nickname">createUser</span> Create user</div>
<div class="method-notes">This can only be done by the logged in user.</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">body (optional)</div>
<div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; Created user object </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="post"><code class="huge"><span>post</span>: /user/createWithArray</code></pre></div>
<div class="method-summary"><span class="nickname">createUsersWithArrayInput</span> Creates list of users with given input array</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">body (optional)</div>
<div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; List of user object </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="post"><code class="huge"><span>post</span>: /user/createWithList</code></pre></div>
<div class="method-summary"><span class="nickname">createUsersWithListInput</span> Creates list of users with given input array</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">body (optional)</div>
<div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; List of user object </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="get"><code class="huge"><span>get</span>: /user/login</code></pre></div>
<div class="method-summary"><span class="nickname">loginUser</span> Logs user into the system</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">username (optional)</div>
<div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; The user name for login </div>
<div class="param">password (optional)</div>
<div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; The password for login in clear text </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#">String</a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="get"><code class="huge"><span>get</span>: /user/logout</code></pre></div>
<div class="method-summary"><span class="nickname">logoutUser</span> Logs out current logged in user session</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="get"><code class="huge"><span>get</span>: /user/{username}</code></pre></div>
<div class="method-summary"><span class="nickname">getUserByName</span> Get user by user name</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">username (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; The name that needs to be fetched. Use user1 for testing. </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#">User</a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="put"><code class="huge"><span>put</span>: /user/{username}</code></pre></div>
<div class="method-summary"><span class="nickname">updateUser</span> Updated user</div>
<div class="method-notes">This can only be done by the logged in user.</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">username (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; name that need to be deleted </div>
<div class="param">body (optional)</div>
<div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; Updated user object </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="delete"><code class="huge"><span>delete</span>: /user/{username}</code></pre></div>
<div class="method-summary"><span class="nickname">deleteUser</span> Delete user</div>
<div class="method-notes">This can only be done by the logged in user.</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">username (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; The name that needs to be deleted </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="put"><code class="huge"><span>put</span>: /pet</code></pre></div>
<div class="method-summary"><span class="nickname">updatePet</span> Update an existing pet</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">body (optional)</div>
<div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; Pet object that needs to be added to the store </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="post"><code class="huge"><span>post</span>: /pet</code></pre></div>
<div class="method-summary"><span class="nickname">addPet</span> Add a new pet to the store</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">body (optional)</div>
<div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; Pet object that needs to be added to the store </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="get"><code class="huge"><span>get</span>: /pet/findByStatus</code></pre></div>
<div class="method-summary"><span class="nickname">findPetsByStatus</span> Finds Pets by status</div>
<div class="method-notes">Multiple status values can be provided with comma seperated strings</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">status (optional)</div>
<div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; Status values that need to be considered for filter </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#Pet">array[Pet]</a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="get"><code class="huge"><span>get</span>: /pet/findByTags</code></pre></div>
<div class="method-summary"><span class="nickname">findPetsByTags</span> Finds Pets by tags</div>
<div class="method-notes">Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">tags (optional)</div>
<div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; Tags to filter by </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#Pet">array[Pet]</a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="get"><code class="huge"><span>get</span>: /pet/{petId}</code></pre></div>
<div class="method-summary"><span class="nickname">getPetById</span> Find pet by ID</div>
<div class="method-notes">Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">petId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; ID of pet that needs to be fetched </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#">Pet</a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="post"><code class="huge"><span>post</span>: /pet/{petId}</code></pre></div>
<div class="method-summary"><span class="nickname">updatePetWithForm</span> Updates a pet in the store with form data</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">petId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; ID of pet that needs to be updated </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="delete"><code class="huge"><span>delete</span>: /pet/{petId}</code></pre></div>
<div class="method-summary"><span class="nickname">deletePet</span> Deletes a pet</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">api_key (required)</div>
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; </div>
<div class="param">petId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; Pet id to delete </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="post"><code class="huge"><span>post</span>: /store/order</code></pre></div>
<div class="method-summary"><span class="nickname">placeOrder</span> Place an order for a pet</div>
<div class="method-notes"></div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">body (optional)</div>
<div class="param-desc"><span class="param-type">Body Parameter</span> &mdash; order placed for purchasing the pet </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#">Order</a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="get"><code class="huge"><span>get</span>: /store/order/{orderId}</code></pre></div>
<div class="method-summary"><span class="nickname">getOrderById</span> Find purchase order by ID</div>
<div class="method-notes">For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">orderId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; ID of pet that needs to be fetched </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#">Order</a></div>
</div> <!-- method -->
<hr>
<div class="method">
<div class="method-path"><pre class="delete"><code class="huge"><span>delete</span>: /store/order/{orderId}</code></pre></div>
<div class="method-summary"><span class="nickname">deleteOrder</span> Delete purchase order by ID</div>
<div class="method-notes">For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors</div>
<h3 class="field-label">Parameters</h3>
<div class="field-items">
<div class="param">orderId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; ID of the order that needs to be deleted </div>
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type"><a href="#"></a></div>
</div> <!-- method -->
<hr>
<h2>Models</h2>
<div class="model">
<h3 class="field-label"><a name="User">User</a></h3>
<div class="field-items">
<div class="param">id </div><div class="param-desc"><span class="param-type">Long</span> </div>
<div class="param">username </div><div class="param-desc"><span class="param-type">String</span> </div>
<div class="param">firstName </div><div class="param-desc"><span class="param-type">String</span> </div>
<div class="param">lastName </div><div class="param-desc"><span class="param-type">String</span> </div>
<div class="param">email </div><div class="param-desc"><span class="param-type">String</span> </div>
<div class="param">password </div><div class="param-desc"><span class="param-type">String</span> </div>
<div class="param">phone </div><div class="param-desc"><span class="param-type">String</span> </div>
<div class="param">userStatus </div><div class="param-desc"><span class="param-type">Integer</span> User Status</div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3 class="field-label"><a name="Category">Category</a></h3>
<div class="field-items">
<div class="param">id </div><div class="param-desc"><span class="param-type">Long</span> </div>
<div class="param">name </div><div class="param-desc"><span class="param-type">String</span> </div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3 class="field-label"><a name="Pet">Pet</a></h3>
<div class="field-items">
<div class="param">id </div><div class="param-desc"><span class="param-type">Long</span> </div>
<div class="param">category </div><div class="param-desc"><span class="param-type">Category</span> </div>
<div class="param">name </div><div class="param-desc"><span class="param-type">String</span> </div>
<div class="param">photoUrls </div><div class="param-desc"><span class="param-type">array[String]</span> </div>
<div class="param">tags </div><div class="param-desc"><span class="param-type">array[Tag]</span> </div>
<div class="param">status </div><div class="param-desc"><span class="param-type">String</span> pet status in the store</div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3 class="field-label"><a name="Tag">Tag</a></h3>
<div class="field-items">
<div class="param">id </div><div class="param-desc"><span class="param-type">Long</span> </div>
<div class="param">name </div><div class="param-desc"><span class="param-type">String</span> </div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3 class="field-label"><a name="Order">Order</a></h3>
<div class="field-items">
<div class="param">id </div><div class="param-desc"><span class="param-type">Long</span> </div>
<div class="param">petId </div><div class="param-desc"><span class="param-type">Long</span> </div>
<div class="param">quantity </div><div class="param-desc"><span class="param-type">Integer</span> </div>
<div class="param">shipDate </div><div class="param-desc"><span class="param-type">Date</span> </div>
<div class="param">status </div><div class="param-desc"><span class="param-type">String</span> Order Status</div>
<div class="param">complete </div><div class="param-desc"><span class="param-type">Boolean</span> </div>
</div> <!-- field-items -->
</div>
<style>
body {
font-family: Trebuchet MS, sans-serif;
font-size: 15px;
color: #444;
margin-right: 24px;
}
h1 {
font-size: 25px;
}
h2 {
font-size: 20px;
}
h3 {
font-size: 16px;
font-weight: bold;
}
hr {
height: 1px;
border: 0;
color: #ddd;
background-color: #ddd;
display: none;
}
.app-desc {
clear: both;
margin-left: 20px;
}
.param-name {
width: 100%;
}
.license-info {
margin-left: 20px;
}
.license-url {
margin-left: 20px;
}
.model {
margin: 0 0 0px 20px;
}
.method {
margin-left: 20px;
}
.method-notes {
margin: 10px 0 20px 0;
font-size: 90%;
color: #555;
}
pre {
padding: 10px;
}
pre.get {
background-color: #0f6ab4;
}
pre.post {
background-color: #10a54a;
}
pre.put {
background-color: #c5862b;
}
pre.delete {
background-color: #a41e22;
}
.huge {
color: #fff;
}
pre.example {
background-color: #f3f3f3;
padding: 10px;
border: 1px solid #ddd;
}
code {
white-space: pre;
}
.nickname {
font-weight: bold;
}
.method-path {
font-size: 1.5em;
background-color: #0f6ab4;
}
.parameter {
width: 500px;
}
.param {
width: 500px;
padding: 10px 0 0 20px;
font-weight: bold;
}
.param-desc {
width: 700px;
padding: 0 0 0 20px;
color: #777;
}
.param-type {
font-style: italic;
}
.field-label {
padding: 0;
margin: 0;
clear: both;
}
.field-items {
padding: 0 0 15px 0;
margin-bottom: 15px;
}
.return-type {
clear: both;
padding-bottom: 10px;
}
.param-header {
font-weight: bold;
}
</style>
</body>
</html>