forked from loafle/openapi-generator-original
Enhancements to documentation generators (samples, default values, etc) (#790)
* enhancements to doc generators (samples, default values, etc) * add 3.3.x to PR template
This commit is contained in:
23
samples/documentation/dynamic-html/.openapi-generator-ignore
Normal file
23
samples/documentation/dynamic-html/.openapi-generator-ignore
Normal file
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1 @@
|
||||
3.2.1-SNAPSHOT
|
||||
1092
samples/documentation/dynamic-html/docs/assets/css/bootstrap-responsive.css
vendored
Normal file
1092
samples/documentation/dynamic-html/docs/assets/css/bootstrap-responsive.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6057
samples/documentation/dynamic-html/docs/assets/css/bootstrap.css
vendored
Normal file
6057
samples/documentation/dynamic-html/docs/assets/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
312
samples/documentation/dynamic-html/docs/assets/css/style.css
Normal file
312
samples/documentation/dynamic-html/docs/assets/css/style.css
Normal file
@@ -0,0 +1,312 @@
|
||||
.line-numbers {
|
||||
margin-right: 1.0em;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.column_header_name {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.column_header_path {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.column_header_name .column_header_param_type .column_header_data_type .column_header_return_type {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.expandable {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main_content {
|
||||
margin-top: 80px;
|
||||
margin-left: 25px;
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
||||
.model {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.model-container {
|
||||
float: left;
|
||||
width: 500px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.model-detail-container {
|
||||
clear: left;
|
||||
float: left;
|
||||
width: 500px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.model-detail-popup {
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0 2px 8px 5px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: black;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
background-color: white;
|
||||
opacity: 0.99;
|
||||
z-index: 1;
|
||||
overflow: scroll;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.model-detail-popup .code {
|
||||
background-color: #E4F5FF;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
margin: 10px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.model-detail-popup h2 {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.model-detail-popup li {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.model-detail-popup .param-reqiured-true {
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
clear: left;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.model-detail-popup .param-required-false {
|
||||
font-family: monospace;
|
||||
clear: left;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.model-detail-popup .param-description {
|
||||
margin-left: 50px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.param-enum {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
border-bottom: 2px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
padding: 6px 0;
|
||||
color: rgb(57,57,57);
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.content h1 {
|
||||
font-size: 43px;
|
||||
text-align: center;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
box-sizing: border-box;
|
||||
float: left;
|
||||
display: block;
|
||||
width: 240px;
|
||||
overflow: scroll;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.section-box {
|
||||
border-bottom-style: solid;
|
||||
border-bottom: 10px;
|
||||
}
|
||||
|
||||
.section-box ul li {
|
||||
list-style: none;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.non-sidebar {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
margin-left: 240px;
|
||||
margin-right: 0px;
|
||||
width: 638px;
|
||||
}
|
||||
|
||||
.non-sidebar h2 {
|
||||
clear: left;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
li.parameter {
|
||||
list-style: none;
|
||||
display: block;
|
||||
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 {
|
||||
display: block;
|
||||
font-family: 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif;
|
||||
}
|
||||
|
||||
.param-optional-flag {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.section {
|
||||
font-weight: normal;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.section a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.code {
|
||||
background-color: #E4F5FF;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
margin: 10px;
|
||||
overflow: auto;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
text-align: left;
|
||||
background-color: black;
|
||||
float: left;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 70px auto;
|
||||
padding-bottom: 20px;
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0 2px 8px 5px;
|
||||
}
|
||||
|
||||
.top-bar h1 a {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.top-bar h1#logo a {
|
||||
width: auto;
|
||||
display: block;
|
||||
clear: none;
|
||||
float: left;
|
||||
background-position: left;;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.top-bar ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.top-bar h1#logo span {
|
||||
display: block;
|
||||
clear: none;
|
||||
float: left;
|
||||
padding-top: 10px;
|
||||
padding-left: 10px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.top-bar h1#logo a span.light {
|
||||
color: #ffc97a;
|
||||
color: #666666;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.top-bar ul#nav {
|
||||
float: none;
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
float: right;
|
||||
clear: none;
|
||||
}
|
||||
|
||||
.top-bar ul#nav li {
|
||||
float: left;
|
||||
clear: none;
|
||||
margin: 0;
|
||||
padding: 2px 10px;
|
||||
border-right: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.top-bar ul#nav li:first-child, .top-bar ul#nav li.first {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.top-bar ul#nav li:last-child, .top-bar ul#nav li.last {
|
||||
padding-right: 0;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.top-bar ul#nav li {
|
||||
border: none;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.top-bar ul#nav li a {
|
||||
display: block;
|
||||
padding: 8px 10px 8px 10px;
|
||||
color: #999999;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.top-bar ul#nav li a.strong {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.top-bar ul#nav li a:active, .top-bar ul#nav li a.active, .top-bar ul#nav li a:hover {
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-o-border-radius: 4px;
|
||||
-ms-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background-image: -webkit-gradient(linear, 0% 100%, 0% 0%, color-stop(0%, #ff5401), color-stop(100%, #ffa014));
|
||||
background-image: -moz-linear-gradient(bottom, #ff5401 0%, #ffa014 100%);
|
||||
background-image: linear-gradient(bottom, #ff5401 0%, #ffa014 100%);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.top-bar ul#nav:hover li {
|
||||
border-color: #222222;
|
||||
}
|
||||
BIN
samples/documentation/dynamic-html/docs/assets/images/logo.png
Normal file
BIN
samples/documentation/dynamic-html/docs/assets/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
2159
samples/documentation/dynamic-html/docs/assets/js/bootstrap.js
vendored
Normal file
2159
samples/documentation/dynamic-html/docs/assets/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
samples/documentation/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
vendored
Normal file
2
samples/documentation/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
70
samples/documentation/dynamic-html/docs/assets/js/main.js
Normal file
70
samples/documentation/dynamic-html/docs/assets/js/main.js
Normal file
@@ -0,0 +1,70 @@
|
||||
window.onhashchange = function() {
|
||||
choose(window.location.href.toString());
|
||||
}
|
||||
|
||||
var selectionImage;
|
||||
|
||||
function choose(url) {
|
||||
var f = url.split("/").slice(-1)[0].split("?")[0];
|
||||
if(f.match(/#/g) && f.match(/#/g).length > 0) {
|
||||
f = f.split("#")[0];
|
||||
}
|
||||
$('div.non-sidebar').empty();
|
||||
$('div.non-sidebar').load("operations/" + f + ".html", function(){
|
||||
goToAnchor();
|
||||
// rebind the models
|
||||
$(".model a").on("click", function(e){
|
||||
e.preventDefault();
|
||||
var model = $(this).parent().attr("data-model")
|
||||
var parentOffset = $(this).parent().offset();
|
||||
var encodedWord = encodeURI(model);
|
||||
|
||||
if(!selectionImage) {
|
||||
selectionImage = $('<div>').attr({
|
||||
title: 'Model detail',
|
||||
target: '_blank',
|
||||
class: 'model-detail-popup'
|
||||
}).hide();
|
||||
$('div.model-container').append(selectionImage);
|
||||
}
|
||||
|
||||
selectionImage.load("models/" + encodedWord + ".html")
|
||||
selectionImage.attr('href',url.replace('{term}',encodeURI(model))).css({
|
||||
left: e.pageX + 20,
|
||||
top: e.pageY - 10,
|
||||
position: "absolute"
|
||||
}).fadeIn();
|
||||
})
|
||||
});
|
||||
|
||||
$("body").on("click",function(e) {
|
||||
var target = $(e.target);
|
||||
if (target.parents(".model-detail-popup").length == 0 && target.parents('.model').length != 1) {
|
||||
if(document.querySelector('.model-detail-popup')) {
|
||||
document.querySelector('.model-detail-popup').style.display = 'none';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function goToAnchor() {
|
||||
var doARead = $($('a')[0]).offset();
|
||||
var anchorArr = window.location.href.toString().split("#");
|
||||
if(anchorArr.length > 2) {
|
||||
var anchor = anchorArr[anchorArr.length-1];
|
||||
window.scrollTo(0,$('a[name='+anchor+']').offset().top - 80);
|
||||
}
|
||||
}
|
||||
function resize()
|
||||
{
|
||||
$(".sidebar").css('height', $(window).height() -60);
|
||||
$("#content-window").css('height', $(window).height() -60);
|
||||
|
||||
}
|
||||
$(function(){
|
||||
window.onresize = resize;
|
||||
resize();
|
||||
$(window).bind('hashchange', function() {
|
||||
choose(window.location.href.toString());
|
||||
});
|
||||
});
|
||||
83
samples/documentation/dynamic-html/docs/index.html
Normal file
83
samples/documentation/dynamic-html/docs/index.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap-responsive.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
|
||||
<script src="assets/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||
<script src="assets/js/main.js" type="text/javascript"></script>
|
||||
|
||||
<title>REST API Resources</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="top-bar">
|
||||
<h1 id="logo"><a class="logo" href="/"><span>OpenAPI</span><span class="light">API Docs</span></a></h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model-container"></div>
|
||||
<div class="content">
|
||||
<div class="box clearfix">
|
||||
<div class="sidebar">
|
||||
<div class="section-box">
|
||||
<div class="section-header">
|
||||
Overview
|
||||
</div>
|
||||
<ul>
|
||||
<li>Getting Started</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section-box">
|
||||
<div class="section-header">
|
||||
<a href="#!/PetApi">PetApi</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="#!/PetApi#addPet">addPet</a></li>
|
||||
<li><a href="#!/PetApi#deletePet">deletePet</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#updatePet">updatePet</a></li>
|
||||
<li><a href="#!/PetApi#updatePetWithForm">updatePetWithForm</a></li>
|
||||
<li><a href="#!/PetApi#uploadFile">uploadFile</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section-box">
|
||||
<div class="section-header">
|
||||
<a href="#!/StoreApi">StoreApi</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="#!/StoreApi#deleteOrder">deleteOrder</a></li>
|
||||
<li><a href="#!/StoreApi#getInventory">getInventory</a></li>
|
||||
<li><a href="#!/StoreApi#getOrderById">getOrderById</a></li>
|
||||
<li><a href="#!/StoreApi#placeOrder">placeOrder</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section-box">
|
||||
<div class="section-header">
|
||||
<a href="#!/UserApi">UserApi</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="#!/UserApi#createUser">createUser</a></li>
|
||||
<li><a href="#!/UserApi#createUsersWithArrayInput">createUsersWithArrayInput</a></li>
|
||||
<li><a href="#!/UserApi#createUsersWithListInput">createUsersWithListInput</a></li>
|
||||
<li><a href="#!/UserApi#deleteUser">deleteUser</a></li>
|
||||
<li><a href="#!/UserApi#getUserByName">getUserByName</a></li>
|
||||
<li><a href="#!/UserApi#loginUser">loginUser</a></li>
|
||||
<li><a href="#!/UserApi#logoutUser">logoutUser</a></li>
|
||||
<li><a href="#!/UserApi#updateUser">updateUser</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="non-sidebar">
|
||||
<div class="main-content">
|
||||
<h2>Getting Started</h2>
|
||||
<p>To begin using your fancy HTTP API, follow the steps below.</p>
|
||||
<p>You can add some helpful tips, here</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
<h2>ApiResponse</h2>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">code : Integer
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">type : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">message : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
12
samples/documentation/dynamic-html/docs/models/Category.html
Normal file
12
samples/documentation/dynamic-html/docs/models/Category.html
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
<h2>Category</h2>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">name : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
39
samples/documentation/dynamic-html/docs/models/Order.html
Normal file
39
samples/documentation/dynamic-html/docs/models/Order.html
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
<h2>Order</h2>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">petId : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">quantity : Integer
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">shipDate : Date
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">status : String
|
||||
<br/>Order Status
|
||||
<dl class="param-enum">
|
||||
<dt>Enum:
|
||||
<dd>placed</dd>
|
||||
<dd>approved</dd>
|
||||
<dd>delivered</dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">complete : Boolean
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
39
samples/documentation/dynamic-html/docs/models/Pet.html
Normal file
39
samples/documentation/dynamic-html/docs/models/Pet.html
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
<h2>Pet</h2>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">category : Category
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-true">name : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-true">photoUrls : List
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">tags : List
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">status : String
|
||||
<br/>pet status in the store
|
||||
<dl class="param-enum">
|
||||
<dt>Enum:
|
||||
<dd>available</dd>
|
||||
<dd>pending</dd>
|
||||
<dd>sold</dd>
|
||||
</dt>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
12
samples/documentation/dynamic-html/docs/models/Tag.html
Normal file
12
samples/documentation/dynamic-html/docs/models/Tag.html
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
<h2>Tag</h2>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">name : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
42
samples/documentation/dynamic-html/docs/models/User.html
Normal file
42
samples/documentation/dynamic-html/docs/models/User.html
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
<h2>User</h2>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">id : Long
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">username : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">firstName : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">lastName : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">email : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">password : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">phone : String
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="parameter">
|
||||
<li class="param-required-false">userStatus : Integer
|
||||
<br/>User Status
|
||||
</li>
|
||||
</ul>
|
||||
252
samples/documentation/dynamic-html/docs/operations/PetApi.html
Normal file
252
samples/documentation/dynamic-html/docs/operations/PetApi.html
Normal file
@@ -0,0 +1,252 @@
|
||||
<div class="main-content">
|
||||
<h2><a name=""></a></h2>
|
||||
<p>This is the API</p>
|
||||
|
||||
<h2><a name="addPet"></a>addPet</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>POST</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-in">Body: </span>
|
||||
<span class="param-name">Pet</span>
|
||||
<span class="param-type">Pet(Pet)</span>
|
||||
|
||||
<p class="param-description">Pet object that needs to be added to the store</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="deletePet"></a>deletePet</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet/{petId}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>DELETE</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<span class="param-name">petId</span>
|
||||
<span class="param-type">Long</span>
|
||||
|
||||
<p class="param-description">Pet id to delete</p>
|
||||
</li>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
</ul>
|
||||
<h2><a name="findPetsByStatus"></a>findPetsByStatus</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>Multiple status values can be provided with comma separated strings</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet/findByStatus</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="Pet"><a href="">List</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
<span class="param-in">Query: </span>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
<h2><a name="findPetsByTags"></a>findPetsByTags</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet/findByTags</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="Pet"><a href="">List</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
<span class="param-in">Query: </span>
|
||||
|
||||
|
||||
|
||||
<span class="param-name">tags</span>
|
||||
<span class="param-type">List(String)</span>
|
||||
|
||||
<p class="param-description">Tags to filter by</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="getPetById"></a>getPetById</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>Returns a single pet</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet/{petId}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="Pet"><a href="">Pet</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<span class="param-name">petId</span>
|
||||
<span class="param-type">Long</span>
|
||||
|
||||
<p class="param-description">ID of pet to return</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="updatePet"></a>updatePet</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>PUT</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-in">Body: </span>
|
||||
<span class="param-name">Pet</span>
|
||||
<span class="param-type">Pet(Pet)</span>
|
||||
|
||||
<p class="param-description">Pet object that needs to be added to the store</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="updatePetWithForm"></a>updatePetWithForm</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet/{petId}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>POST</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<span class="param-name">petId</span>
|
||||
<span class="param-type">Long</span>
|
||||
|
||||
<p class="param-description">ID of pet that needs to be updated</p>
|
||||
</li>
|
||||
<li class="parameter">
|
||||
<span class="param-in">Form: </span>
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-name">name</span>
|
||||
<span class="param-type">String(string)</span>
|
||||
|
||||
<p class="param-description">Updated name of the pet</p>
|
||||
</li>
|
||||
<li class="parameter">
|
||||
<span class="param-in">Form: </span>
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-name">status</span>
|
||||
<span class="param-type">String(string)</span>
|
||||
|
||||
<p class="param-description">Updated status of the pet</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="uploadFile"></a>uploadFile</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/pet/{petId}/uploadImage</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>POST</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="ApiResponse"><a href="">ApiResponse</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<span class="param-name">petId</span>
|
||||
<span class="param-type">Long</span>
|
||||
|
||||
<p class="param-description">ID of pet to update</p>
|
||||
</li>
|
||||
<li class="parameter">
|
||||
<span class="param-in">Form: </span>
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-name">additionalMetadata</span>
|
||||
<span class="param-type">String(string)</span>
|
||||
|
||||
<p class="param-description">Additional data to pass to server</p>
|
||||
</li>
|
||||
<li class="parameter">
|
||||
<span class="param-in">Form: </span>
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-name">file</span>
|
||||
<span class="param-type">File(file)</span>
|
||||
|
||||
<p class="param-description">file to upload</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,90 @@
|
||||
<div class="main-content">
|
||||
<h2><a name=""></a></h2>
|
||||
<p>This is the API</p>
|
||||
|
||||
<h2><a name="deleteOrder"></a>deleteOrder</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/store/order/{orderId}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>DELETE</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<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>
|
||||
<h2><a name="getInventory"></a>getInventory</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>Returns a map of status codes to quantities</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/store/inventory</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="integer"><a href="">Map</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
</ul>
|
||||
<h2><a name="getOrderById"></a>getOrderById</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/store/order/{orderId}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="Order"><a href="">Order</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<span class="param-name">orderId</span>
|
||||
<span class="param-type">Long</span>
|
||||
|
||||
<p class="param-description">ID of pet that needs to be fetched</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="placeOrder"></a>placeOrder</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/store/order</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>POST</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="Order"><a href="">Order</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-in">Body: </span>
|
||||
<span class="param-name">Order</span>
|
||||
<span class="param-type">Order(Order)</span>
|
||||
|
||||
<p class="param-description">order placed for purchasing the pet</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
208
samples/documentation/dynamic-html/docs/operations/UserApi.html
Normal file
208
samples/documentation/dynamic-html/docs/operations/UserApi.html
Normal file
@@ -0,0 +1,208 @@
|
||||
<div class="main-content">
|
||||
<h2><a name=""></a></h2>
|
||||
<p>This is the API</p>
|
||||
|
||||
<h2><a name="createUser"></a>createUser</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>This can only be done by the logged in user.</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>POST</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-in">Body: </span>
|
||||
<span class="param-name">User</span>
|
||||
<span class="param-type">User(User)</span>
|
||||
|
||||
<p class="param-description">Created user object</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="createUsersWithArrayInput"></a>createUsersWithArrayInput</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user/createWithArray</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>POST</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-in">Body: </span>
|
||||
<span class="param-name">User</span>
|
||||
<span class="param-type">List(array)</span>
|
||||
|
||||
<p class="param-description">List of user object</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="createUsersWithListInput"></a>createUsersWithListInput</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user/createWithList</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>POST</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-in">Body: </span>
|
||||
<span class="param-name">User</span>
|
||||
<span class="param-type">List(array)</span>
|
||||
|
||||
<p class="param-description">List of user object</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="deleteUser"></a>deleteUser</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>This can only be done by the logged in user.</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user/{username}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>DELETE</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<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>
|
||||
<h2><a name="getUserByName"></a>getUserByName</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user/{username}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="User"><a href="">User</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<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>
|
||||
<h2><a name="loginUser"></a>loginUser</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user/login</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model="string"><a href="">String</a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
<span class="param-in">Query: </span>
|
||||
|
||||
|
||||
|
||||
<span class="param-name">username</span>
|
||||
<span class="param-type">String</span>
|
||||
|
||||
<p class="param-description">The user name for login</p>
|
||||
</li>
|
||||
<li class="parameter">
|
||||
|
||||
<span class="param-in">Query: </span>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
<h2><a name="logoutUser"></a>logoutUser</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user/logout</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>GET</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
</ul>
|
||||
<h2><a name="updateUser"></a>updateUser</h2>
|
||||
<hr>
|
||||
<p></p>
|
||||
<p>This can only be done by the logged in user.</p>
|
||||
<h3 class="section">URL</h3>
|
||||
<code>http://petstore.swagger.io/v2/user/{username}</code>
|
||||
<h3 class="section">HTTP Method</h3>
|
||||
<code>PUT</code>
|
||||
<h3 class="section">Response Type</h3>
|
||||
<div class="model" data-model=""><a href=""></a></div>
|
||||
<h3 class="section">Parameters</h3>
|
||||
<ul>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
<span class="param-in">Path: </span>
|
||||
|
||||
|
||||
<span class="param-name">username</span>
|
||||
<span class="param-type">String</span>
|
||||
|
||||
<p class="param-description">name that need to be deleted</p>
|
||||
</li>
|
||||
<li class="parameter">
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="param-in">Body: </span>
|
||||
<span class="param-name">User</span>
|
||||
<span class="param-type">User(User)</span>
|
||||
|
||||
<p class="param-description">Updated user object</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
7
samples/documentation/dynamic-html/main.js
Normal file
7
samples/documentation/dynamic-html/main.js
Normal file
@@ -0,0 +1,7 @@
|
||||
var express = require("express")
|
||||
|
||||
var app = express();
|
||||
var docs_handler = express.static(__dirname + '/docs/');
|
||||
app.use(docs_handler);
|
||||
// start the server
|
||||
app.listen(8002);
|
||||
12
samples/documentation/dynamic-html/package.json
Normal file
12
samples/documentation/dynamic-html/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "openapi-docs",
|
||||
"version": "1.0.0",
|
||||
"main": "main.js",
|
||||
"engines": {
|
||||
"node": ">= 0.8.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "3.x"
|
||||
},
|
||||
"license": "Unlicense"
|
||||
}
|
||||
Reference in New Issue
Block a user