mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
rollback nodejs and htmldocs template
This commit is contained in:
parent
eee8685847
commit
eede02a6ab
@ -1,5 +1,3 @@
|
||||
{{#isBodyParam}}
|
||||
<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
{{#isBodyParam}}<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Body Parameter</span> — {{description}} {{#defaultValue}}
|
||||
default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isBodyParam}}
|
||||
<div class="param-desc"><span class="param-type">Body Parameter</span> — {{description}} {{#defaultValue}}default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isBodyParam}}
|
@ -1,5 +1,3 @@
|
||||
{{#isFormParam}}
|
||||
<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
{{#isFormParam}}<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Form Parameter</span> — {{description}} {{#defaultValue}}
|
||||
default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isFormParam}}
|
||||
<div class="param-desc"><span class="param-type">Form Parameter</span> — {{description}} {{#defaultValue}}default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isFormParam}}
|
@ -1,5 +1,3 @@
|
||||
{{#isHeaderParam}}
|
||||
<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
{{#isHeaderParam}}<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Header Parameter</span> — {{description}} {{#defaultValue}}
|
||||
default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isHeaderParam}}
|
||||
<div class="param-desc"><span class="param-type">Header Parameter</span> — {{description}} {{#defaultValue}}default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isHeaderParam}}
|
@ -1,76 +1,61 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>API Reference</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{{appName}}}</h1>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{{appName}}}</h1>
|
||||
<div class="app-desc">{{{appDescription}}} for {{partner}}</div>
|
||||
{{#infoUrl}}<div class="app-desc">More information: <a href="{{{infoUrl}}}">{{{infoUrl}}}</a></div>{{/infoUrl}}
|
||||
{{#infoEmail}}<div class="app-desc">Contact Info: <a href="{{{infoEmail}}}">{{{infoEmail}}}</a></div>{{/infoEmail}}
|
||||
{{#version}}<div class="app-desc">Version: {{{version}}}</div>{{/version}}
|
||||
<div class="license-info">{{{licenseInfo}}}</div>
|
||||
<div class="license-url">{{{licenseUrl}}}</div>
|
||||
<h2>Access</h2>
|
||||
<div class="method-summary">Customize this message as you see fit!</div>
|
||||
<h2>Methods</h2>
|
||||
{{#apiInfo}}
|
||||
{{#apis}}
|
||||
{{#operations}}{{#operation}}
|
||||
<div class="method">
|
||||
<div class="method-path"><pre class="{{httpMethod}}"><code class="huge"><span>{{httpMethod}}</span>: {{path}}</code></pre></div>
|
||||
<div class="method-tags"> {{#tags}}<span class="method-tag">{{this}}</span>{{/tags}}</div>
|
||||
<div class="method-summary"><span class="nickname">{{nickname}}</span> {{summary}}</div>
|
||||
<div class="method-notes">{{notes}}</div>
|
||||
|
||||
<div class="app-desc">{{{appDescription}}} for {{partner}}</div>
|
||||
{{#infoUrl}}
|
||||
<div class="app-desc">More information: <a href="{{{infoUrl}}}">{{{infoUrl}}}</a></div>{{/infoUrl}}
|
||||
{{#infoEmail}}
|
||||
<div class="app-desc">Contact Info: <a href="{{{infoEmail}}}">{{{infoEmail}}}</a></div>{{/infoEmail}}
|
||||
{{#version}}
|
||||
<div class="app-desc">Version: {{{version}}}</div>{{/version}}
|
||||
<div class="license-info">{{{licenseInfo}}}</div>
|
||||
<div class="license-url">{{{licenseUrl}}}</div>
|
||||
<h2>Access</h2>
|
||||
<h3 class="field-label">Parameters</h3>
|
||||
<div class="field-items">
|
||||
{{#allParams}}{{>queryParam}}{{>pathParam}}{{>bodyParam}}{{>headerParam}}{{>formParam}}
|
||||
{{/allParams}}
|
||||
</div> <!-- field-items -->
|
||||
<h3 class="field-label">Return type</h3>
|
||||
|
||||
<div class="method-summary">Customize this message as you see fit!</div>
|
||||
<h2>Methods</h2>
|
||||
{{#apiInfo}}
|
||||
{{#apis}}
|
||||
{{#operations}}{{#operation}}
|
||||
<div class="method">
|
||||
<div class="method-path">
|
||||
<pre class="{{httpMethod}}"><code class="huge"><span>{{httpMethod}}</span>: {{path}}</code></pre>
|
||||
</div>
|
||||
<div class="method-tags"> {{#tags}}<span class="method-tag">{{this}}</span>{{/tags}}</div>
|
||||
<div class="method-summary"><span class="nickname">{{nickname}}</span> {{summary}}</div>
|
||||
<div class="method-notes">{{notes}}</div>
|
||||
<div class="return-type"><a href="#{{returnContainer}}">{{{returnType}}}</a></div>
|
||||
|
||||
<h3 class="field-label">Parameters</h3>
|
||||
{{#examples}}
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: {{{contentType}}}</div>
|
||||
<pre class="example"><code>{{example}}</code></pre>
|
||||
{{/examples}}
|
||||
</div> <!-- method -->
|
||||
<hr>
|
||||
{{/operation}}{{/operations}}
|
||||
{{/apis}}{{/apiInfo}}
|
||||
|
||||
<div class="field-items">
|
||||
{{#allParams}}{{>queryParam}}{{>pathParam}}{{>bodyParam}}{{>headerParam}}{{>formParam}}
|
||||
{{/allParams}}
|
||||
</div>
|
||||
<!-- field-items -->
|
||||
<h3 class="field-label">Return type</h3>
|
||||
|
||||
<div class="return-type"><a href="#{{returnContainer}}">{{{returnType}}}</a></div>
|
||||
|
||||
{{#examples}}
|
||||
<h3 class="field-label">Example data</h3>
|
||||
|
||||
<div class="example-data-content-type">Content-Type: {{{contentType}}}</div>
|
||||
<pre class="example"><code>{{example}}</code></pre>
|
||||
{{/examples}}
|
||||
</div>
|
||||
<!-- method -->
|
||||
<hr>
|
||||
{{/operation}}{{/operations}}
|
||||
{{/apis}}{{/apiInfo}}
|
||||
|
||||
<h2>Models</h2>
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
<div class="model">
|
||||
<h3 class="field-label"><a name="{{classname}}">{{classname}}</a></h3>
|
||||
|
||||
<div class="field-items">
|
||||
{{#vars}}
|
||||
<div class="param">{{name}} {{#isNotRequired}}(optional){{/isNotRequired}}</div>
|
||||
<div class="param-desc"><span class="param-type">{{datatype}}</span> {{description}}</div>
|
||||
{{/vars}}
|
||||
</div>
|
||||
<!-- field-items -->
|
||||
</div>
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
<style>
|
||||
{{>style.css}}
|
||||
</style>
|
||||
</body>
|
||||
<h2>Models</h2>
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
<div class="model">
|
||||
<h3 class="field-label"><a name="{{classname}}">{{classname}}</a></h3>
|
||||
<div class="field-items">
|
||||
{{#vars}}<div class="param">{{name}} {{#isNotRequired}}(optional){{/isNotRequired}}</div><div class="param-desc"><span class="param-type">{{datatype}}</span> {{description}}</div>
|
||||
{{/vars}}
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
<style>
|
||||
{{>style.css}}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
@ -1,5 +1,3 @@
|
||||
{{#isPathParam}}
|
||||
<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
{{#isPathParam}}<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Path Parameter</span> — {{description}} {{#defaultValue}}
|
||||
default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isPathParam}}
|
||||
<div class="param-desc"><span class="param-type">Path Parameter</span> — {{description}} {{#defaultValue}}default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isPathParam}}
|
@ -1,5 +1,3 @@
|
||||
{{#isQueryParam}}
|
||||
<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
{{#isQueryParam}}<div class="param">{{paramName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Query Parameter</span> — {{description}} {{#defaultValue}}
|
||||
default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isQueryParam}}
|
||||
<div class="param-desc"><span class="param-type">Query Parameter</span> — {{description}} {{#defaultValue}}default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isQueryParam}}
|
@ -1,151 +1,151 @@
|
||||
body {
|
||||
font-family: Trebuchet MS, sans-serif;
|
||||
font-size: 15px;
|
||||
color: #444;
|
||||
margin-right: 24px;
|
||||
font-family: Trebuchet MS, sans-serif;
|
||||
font-size: 15px;
|
||||
color: #444;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 25px;
|
||||
h1 {
|
||||
font-size: 25px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
color: #ddd;
|
||||
background-color: #ddd;
|
||||
display: none;
|
||||
hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
color: #ddd;
|
||||
background-color: #ddd;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.app-desc {
|
||||
clear: both;
|
||||
margin-left: 20px;
|
||||
clear: both;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.param-name {
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.license-info {
|
||||
margin-left: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.license-url {
|
||||
margin-left: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.model {
|
||||
margin: 0 0 0px 20px;
|
||||
margin: 0 0 0px 20px;
|
||||
}
|
||||
|
||||
.method {
|
||||
margin-left: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.method-notes {
|
||||
margin: 10px 0 20px 0;
|
||||
font-size: 90%;
|
||||
color: #555;
|
||||
.method-notes {
|
||||
margin: 10px 0 20px 0;
|
||||
font-size: 90%;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 10px;
|
||||
margin-bottom: 2px;
|
||||
padding: 10px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
pre.get {
|
||||
background-color: #0f6ab4;
|
||||
background-color: #0f6ab4;
|
||||
}
|
||||
|
||||
pre.post {
|
||||
background-color: #10a54a;
|
||||
background-color: #10a54a;
|
||||
}
|
||||
|
||||
pre.put {
|
||||
background-color: #c5862b;
|
||||
background-color: #c5862b;
|
||||
}
|
||||
|
||||
pre.delete {
|
||||
background-color: #a41e22;
|
||||
background-color: #a41e22;
|
||||
}
|
||||
|
||||
.huge {
|
||||
color: #fff;
|
||||
.huge {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
pre.example {
|
||||
background-color: #f3f3f3;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f3f3f3;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
code {
|
||||
white-space: pre;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.method-path {
|
||||
font-size: 1.5em;
|
||||
background-color: #0f6ab4;
|
||||
font-size: 1.5em;
|
||||
background-color: #0f6ab4;
|
||||
}
|
||||
|
||||
.parameter {
|
||||
width: 500px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.param {
|
||||
width: 500px;
|
||||
padding: 10px 0 0 20px;
|
||||
font-weight: bold;
|
||||
width: 500px;
|
||||
padding: 10px 0 0 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.param-desc {
|
||||
width: 700px;
|
||||
padding: 0 0 0 20px;
|
||||
color: #777;
|
||||
width: 700px;
|
||||
padding: 0 0 0 20px;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.param-type {
|
||||
font-style: italic;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
clear: both;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.field-items {
|
||||
padding: 0 0 15px 0;
|
||||
margin-bottom: 15px;
|
||||
.field-items {
|
||||
padding: 0 0 15px 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.return-type {
|
||||
clear: both;
|
||||
padding-bottom: 10px;
|
||||
clear: both;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.param-header {
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.method-tags {
|
||||
text-align: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.method-tag {
|
||||
background: none repeat scroll 0% 0% #24A600;
|
||||
border-radius: 3px;
|
||||
padding: 2px 10px;
|
||||
margin: 2px;
|
||||
color: #FFF;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
background: none repeat scroll 0% 0% #24A600;
|
||||
border-radius: 3px;
|
||||
padding: 2px 10px;
|
||||
margin: 2px;
|
||||
color: #FFF;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
}
|
@ -4,22 +4,22 @@ var url = require('url');
|
||||
|
||||
{{#operations}}
|
||||
|
||||
var {{classname}} = require('./{{classname}}Service');
|
||||
var {{classname}} = require('./{{classname}}Service');
|
||||
|
||||
{{#operation}}
|
||||
{{#operation}}
|
||||
|
||||
module.exports.{{nickname}} = function {{nickname}} (req, res, next) {
|
||||
{{#allParams}}var {{paramName}} = req.swagger.params['{{baseName}}'].value;
|
||||
{{/allParams}}
|
||||
module.exports.{{nickname}} = function {{nickname}} (req, res, next) {
|
||||
{{#allParams}}var {{paramName}} = req.swagger.params['{{baseName}}'].value;
|
||||
{{/allParams}}
|
||||
|
||||
var result = {{classname}}.{{nickname}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
var result = {{classname}}.{{nickname}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
|
||||
if(typeof result !== 'undefined') {
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify(result || {}, null, 2));
|
||||
}
|
||||
else
|
||||
res.end();
|
||||
};
|
||||
{{/operation}}
|
||||
if(typeof result !== 'undefined') {
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify(result || {}, null, 2));
|
||||
}
|
||||
else
|
||||
res.end();
|
||||
};
|
||||
{{/operation}}
|
||||
{{/operations}}
|
@ -8,9 +8,9 @@ var serverPort = {{serverPort}};
|
||||
|
||||
// swaggerRouter configuration
|
||||
var options = {
|
||||
swaggerUi: '/swagger.json',
|
||||
controllers: './controllers',
|
||||
useStubs: process.env.NODE_ENV === 'development' ? true : false // Conditionally turn on stubs (mock mode)
|
||||
swaggerUi: '/swagger.json',
|
||||
controllers: './controllers',
|
||||
useStubs: process.env.NODE_ENV === 'development' ? true : false // Conditionally turn on stubs (mock mode)
|
||||
};
|
||||
|
||||
// The Swagger document (require it, build it programmatically, fetch it from a URL, ...)
|
||||
@ -18,21 +18,21 @@ var swaggerDoc = require('./api/swagger.json');
|
||||
|
||||
// Initialize the Swagger middleware
|
||||
swaggerTools.initializeMiddleware(swaggerDoc, function (middleware) {
|
||||
// Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain
|
||||
app.use(middleware.swaggerMetadata());
|
||||
// Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain
|
||||
app.use(middleware.swaggerMetadata());
|
||||
|
||||
// Validate Swagger requests
|
||||
app.use(middleware.swaggerValidator());
|
||||
// Validate Swagger requests
|
||||
app.use(middleware.swaggerValidator());
|
||||
|
||||
// Route validated requests to appropriate controller
|
||||
app.use(middleware.swaggerRouter(options));
|
||||
// Route validated requests to appropriate controller
|
||||
app.use(middleware.swaggerRouter(options));
|
||||
|
||||
// Serve the Swagger documents and Swagger UI
|
||||
app.use(middleware.swaggerUi());
|
||||
// Serve the Swagger documents and Swagger UI
|
||||
app.use(middleware.swaggerUi());
|
||||
|
||||
// Start the server
|
||||
http.createServer(app).listen({{serverPort}}, function () {
|
||||
console.log('Your server is listening on port %d (http://localhost:%d)', {{serverPort}}, {{serverPort}});
|
||||
console.log('Swagger-ui is available on http://localhost:%d/docs', {{serverPort}});
|
||||
});
|
||||
// Start the server
|
||||
http.createServer(app).listen({{serverPort}}, function () {
|
||||
console.log('Your server is listening on port %d (http://localhost:%d)', {{serverPort}}, {{serverPort}});
|
||||
console.log('Swagger-ui is available on http://localhost:%d/docs', {{serverPort}});
|
||||
});
|
||||
});
|
@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "{{projectName}}",
|
||||
"version": "{{appVersion}}",
|
||||
"description": "{{appDescription}}",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
"swagger"
|
||||
],
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"connect": "^3.2.0",
|
||||
"swagger-tools": "0.8.*"
|
||||
}
|
||||
"name": "{{projectName}}",
|
||||
"version": "{{appVersion}}",
|
||||
"description": "{{appDescription}}",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
"swagger"
|
||||
],
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"connect": "^3.2.0",
|
||||
"swagger-tools": "0.8.*"
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
exports.{{nickname}} = function({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
|
||||
{{#operation}}
|
||||
exports.{{nickname}} = function({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
|
||||
|
||||
var examples = {};
|
||||
{{#examples}}
|
||||
examples['{{contentType}}'] = {{{example}}};
|
||||
{{/examples}}
|
||||
var examples = {};
|
||||
{{#examples}}
|
||||
examples['{{contentType}}'] = {{{example}}};
|
||||
{{/examples}}
|
||||
|
||||
{{#returnType}}
|
||||
if(Object.keys(examples).length > 0)
|
||||
return examples[Object.keys(examples)[0]];
|
||||
{{/returnType}}
|
||||
}
|
||||
{{/operation}}
|
||||
{{#returnType}}
|
||||
if(Object.keys(examples).length > 0)
|
||||
return examples[Object.keys(examples)[0]];
|
||||
{{/returnType}}
|
||||
}
|
||||
{{/operation}}
|
||||
{{/operations}}
|
||||
|
@ -1,42 +1,42 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "{{appName}}",
|
||||
"description": "{{appDescription}}",
|
||||
"version": "{{apiVersion}}"
|
||||
},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "{{appName}}",
|
||||
"description": "{{appDescription}}",
|
||||
"version": "{{apiVersion}}"
|
||||
},
|
||||
{{#apiInfo}}
|
||||
"produces": ["application/json"],
|
||||
"host": "localhost:{{serverPort}}",
|
||||
"basePath": "{{contextPath}}",
|
||||
"paths": {
|
||||
{{#apis}}
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
"{{{path}}}": {
|
||||
"{{httpMethod}}": {
|
||||
"x-swagger-router-controller": "{{classname}}",
|
||||
"tags": ["{{baseName}}"],
|
||||
"operationId": "{{operationId}}",{{#hasParams}}
|
||||
"parameters": [
|
||||
{{#allParams}}
|
||||
{{{jsonSchema}}}{{#hasMore}},{{/hasMore}}
|
||||
{{/allParams}}
|
||||
],{{/hasParams}}
|
||||
"responses": {
|
||||
{{#responses}}
|
||||
"{{code}}": {{{jsonSchema}}}
|
||||
{{#hasMore}},{{/hasMore}}
|
||||
{{/responses}}
|
||||
}
|
||||
}
|
||||
} {{#hasMore}},{{/hasMore}}
|
||||
{{/operation}}
|
||||
{{#hasMore}},{{/hasMore}}
|
||||
{{/operations}}
|
||||
{{/apis}}
|
||||
"produces": ["application/json"],
|
||||
"host": "localhost:{{serverPort}}",
|
||||
"basePath": "{{contextPath}}",
|
||||
"paths": {
|
||||
{{#apis}}
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
"{{{path}}}": {
|
||||
"{{httpMethod}}": {
|
||||
"x-swagger-router-controller": "{{classname}}",
|
||||
"tags": ["{{baseName}}"],
|
||||
"operationId": "{{operationId}}",{{#hasParams}}
|
||||
"parameters": [
|
||||
{{#allParams}}
|
||||
{{{jsonSchema}}}{{#hasMore}},{{/hasMore}}
|
||||
{{/allParams}}
|
||||
],{{/hasParams}}
|
||||
"responses": {
|
||||
{{#responses}}
|
||||
"{{code}}": {{{jsonSchema}}}
|
||||
{{#hasMore}},{{/hasMore}}
|
||||
{{/responses}}
|
||||
}
|
||||
}
|
||||
} {{#hasMore}},{{/hasMore}}
|
||||
{{/operation}}
|
||||
{{#hasMore}},{{/hasMore}}
|
||||
{{/operations}}
|
||||
{{/apis}}
|
||||
{{/apiInfo}}
|
||||
}, "definitions": {
|
||||
{{#models}}{{#model}}"{{classVarName}}": {{{modelJson}}}{{#hasMoreModels}},{{/hasMoreModels}}{{/model}}{{/models}}
|
||||
}
|
||||
}, "definitions": {
|
||||
{{#models}}{{#model}}"{{classVarName}}": {{{modelJson}}}{{#hasMoreModels}},{{/hasMoreModels}}{{/model}}{{/models}}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user