Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7424a7009 | ||
|
|
f50851913e | ||
|
|
e3d5ad2595 | ||
|
|
656808b20c | ||
|
|
9fee08daa3 | ||
|
|
cf96414f78 | ||
|
|
80e548df0a | ||
|
|
4bdaeba797 | ||
|
|
15f76ad355 | ||
|
|
f321c62edc | ||
|
|
1a98574c03 | ||
|
|
1ce3dada00 | ||
|
|
dab8c4a0e3 | ||
|
|
87438adc9a | ||
|
|
c385e24839 | ||
|
|
f87eaaa810 | ||
|
|
48e7bc1331 | ||
|
|
ee1698e789 | ||
|
|
084625b759 | ||
|
|
2915a16a14 | ||
|
|
a5c8f2286e | ||
|
|
d3856a8bfa | ||
|
|
0384df092f | ||
|
|
d146b01dc8 | ||
|
|
a906cffea4 | ||
|
|
a1aea70f2c | ||
|
|
826bfcce67 | ||
|
|
45ec53e81a | ||
|
|
eaf59c1e8c | ||
|
|
11f1263a62 | ||
|
|
6c4ccf7a6d | ||
|
|
5df5a8ae60 | ||
|
|
36c5fd89d4 | ||
|
|
7aa075fdd1 | ||
|
|
432d2793db | ||
|
|
7e27c77cb0 | ||
|
|
ef0c392c48 | ||
|
|
dd75674746 | ||
|
|
465164e361 | ||
|
|
4d08591080 | ||
|
|
942df5ed27 | ||
|
|
8e3a8986aa | ||
|
|
aa31d9a24e | ||
|
|
f4a54105b1 | ||
|
|
d3bf3b9a63 | ||
|
|
ec5641a087 | ||
|
|
bcce19f500 | ||
|
|
639cf85c56 | ||
|
|
57c4b7d13a | ||
|
|
c51c683424 | ||
|
|
20daf3c79e | ||
|
|
1bb5b42549 | ||
|
|
a35a145f17 | ||
|
|
6a00aa8e98 | ||
|
|
4414946775 | ||
|
|
cd57350dcd | ||
|
|
e991c70f9e | ||
|
|
63e5f75368 | ||
|
|
225d18e5ae | ||
|
|
4cb3a01943 | ||
|
|
c7c910cf5c | ||
|
|
08402d297e | ||
|
|
c801f036f1 | ||
|
|
ef34071865 | ||
|
|
1128187b5b | ||
|
|
a201d18dc2 |
@@ -32,6 +32,7 @@
|
||||
"SwaggerUi": false,
|
||||
"jsyaml": false,
|
||||
"define": false,
|
||||
"sanitizeHtml": false,
|
||||
|
||||
// Global object
|
||||
// TODO: remove these
|
||||
|
||||
@@ -24,8 +24,8 @@ The OpenAPI Specification has undergone 4 revisions since initial creation in 20
|
||||
|
||||
Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status
|
||||
------------------ | ------------ | -------------------------- | ----- | ------
|
||||
2.1.4 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v.2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
|
||||
2.1.4 | 2016-01-06 | 1.1, 1.2, 2.0 | [tag v.2.1.4](https://github.com/swagger-api/swagger-ui/tree/v2.1.4) |
|
||||
2.2.4 | 2016-09-20 | 1.1, 1.2, 2.0 | [tag v.2.2.4](https://github.com/swagger-api/swagger-ui/tree/v2.2.4) |
|
||||
2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v.2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
|
||||
2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
|
||||
1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
|
||||
1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
|
||||
@@ -81,8 +81,8 @@ To use swagger-ui you should take a look at the [source of swagger-ui html page]
|
||||
|
||||
```javascript
|
||||
var swaggerUi = new SwaggerUi({
|
||||
url:"http://petstore.swagger.io/v2/swagger.json",
|
||||
dom_id:"swagger-ui-container"
|
||||
url: 'http://petstore.swagger.io/v2/swagger.json',
|
||||
dom_id: 'swagger-ui-container'
|
||||
});
|
||||
|
||||
swaggerUi.load();
|
||||
@@ -232,7 +232,7 @@ Only headers with these names will be allowed to be sent by Swagger-UI.
|
||||
|
||||
Create your own fork of [swagger-api/swagger-ui](https://github.com/swagger-api/swagger-ui)
|
||||
|
||||
To share your changes, [submit a pull request](https://github.com/swagger-api/swagger-ui/pull/new/develop_2.0).
|
||||
To share your changes, [submit a pull request](https://github.com/swagger-api/swagger-ui/pull/new/master).
|
||||
|
||||
## Change Log
|
||||
Please see [releases](https://github.com/swagger-api/swagger-ui/releases) for change log.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"Swagger",
|
||||
"API"
|
||||
],
|
||||
"license": "Copyright 2016 SmartBear Software",
|
||||
"license": ["Apache-2.0","Copyright 2016 SmartBear Software","./LICENSE"],
|
||||
"homepage": "http://swagger.io",
|
||||
"private": true,
|
||||
"ignore": [
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "swagger-api/swagger-ui",
|
||||
"description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
||||
"keywords": [
|
||||
"Swagger",
|
||||
"OpenAPI",
|
||||
"specification",
|
||||
"documentation",
|
||||
"API",
|
||||
"UI"
|
||||
],
|
||||
"homepage": "http://swagger.io",
|
||||
"license": "Apache-2.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Tony Tam",
|
||||
"email": "fehguy@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Mohsen Azimi",
|
||||
"email": "me@azimi.me"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -832,6 +832,11 @@
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p {
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
|
||||
color: black;
|
||||
}
|
||||
|
||||
@@ -832,6 +832,11 @@
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p {
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 770 B After Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 670 B |
@@ -16,7 +16,7 @@
|
||||
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
|
||||
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
|
||||
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
|
||||
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||
@@ -59,7 +59,7 @@
|
||||
clientSecret: "your-client-secret-if-required",
|
||||
realm: "your-realms",
|
||||
appName: "your-app-name",
|
||||
scopeSeparator: ",",
|
||||
scopeSeparator: " ",
|
||||
additionalQueryStringParams: {}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Advertència: Obsolet",
|
||||
"Implementation Notes":"Notes d'implementació",
|
||||
"Response Class":"Classe de la Resposta",
|
||||
"Status":"Estatus",
|
||||
"Parameters":"Paràmetres",
|
||||
"Parameter":"Paràmetre",
|
||||
"Value":"Valor",
|
||||
"Description":"Descripció",
|
||||
"Parameter Type":"Tipus del Paràmetre",
|
||||
"Data Type":"Tipus de la Dada",
|
||||
"Response Messages":"Missatges de la Resposta",
|
||||
"HTTP Status Code":"Codi d'Estatus HTTP",
|
||||
"Reason":"Raó",
|
||||
"Response Model":"Model de la Resposta",
|
||||
"Request URL":"URL de la Sol·licitud",
|
||||
"Response Body":"Cos de la Resposta",
|
||||
"Response Code":"Codi de la Resposta",
|
||||
"Response Headers":"Capçaleres de la Resposta",
|
||||
"Hide Response":"Amagar Resposta",
|
||||
"Try it out!":"Prova-ho!",
|
||||
"Show/Hide":"Mostrar/Amagar",
|
||||
"List Operations":"Llista Operacions",
|
||||
"Expand Operations":"Expandir Operacions",
|
||||
"Raw":"Cru",
|
||||
"can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru",
|
||||
"Example Value":"Valor d'Exemple",
|
||||
"Model Schema":"Esquema del Model",
|
||||
"Model":"Model",
|
||||
"apply":"aplicar",
|
||||
"Username":"Nom d'usuari",
|
||||
"Password":"Contrasenya",
|
||||
"Terms of service":"Termes del servei",
|
||||
"Created by":"Creat per",
|
||||
"See more at":"Veure més en",
|
||||
"Contact the developer":"Contactar amb el desenvolupador",
|
||||
"api version":"versió de la api",
|
||||
"Response Content Type":"Tipus de Contingut de la Resposta",
|
||||
"fetching resource":"recollint recurs",
|
||||
"fetching resource list":"recollins llista de recursos",
|
||||
"Explore":"Explorant",
|
||||
"Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.",
|
||||
"Please specify the protocol for":"Si us plau, especifiqueu el protocol per a",
|
||||
"Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI",
|
||||
"Unable to read api":"No es pot llegir l'api",
|
||||
"from path":"des de la ruta",
|
||||
"server returned":"el servidor ha retornat"
|
||||
});
|
||||
@@ -7,9 +7,7 @@ var concat = require('gulp-concat');
|
||||
var uglify = require('gulp-uglify');
|
||||
var rename = require('gulp-rename');
|
||||
var less = require('gulp-less');
|
||||
var handlebars = require('gulp-handlebars');
|
||||
var wrap = require('gulp-wrap');
|
||||
var declare = require('gulp-declare');
|
||||
var watch = require('gulp-watch');
|
||||
var connect = require('gulp-connect');
|
||||
var header = require('gulp-header');
|
||||
@@ -52,17 +50,12 @@ function _dist() {
|
||||
return es.merge(
|
||||
gulp.src([
|
||||
'./node_modules/es5-shim/es5-shim.js',
|
||||
'./lib/sanitize-html.min.js',
|
||||
'./src/main/javascript/**/*.js',
|
||||
'./node_modules/swagger-client/browser/swagger-client.js'
|
||||
]),
|
||||
gulp
|
||||
.src(['./src/main/template/**/*'])
|
||||
.pipe(handlebars())
|
||||
.pipe(wrap('Handlebars.template(<%= contents %>)'))
|
||||
.pipe(declare({
|
||||
namespace: 'Handlebars.templates',
|
||||
noRedeclare: true, // Avoid duplicate declarations
|
||||
}))
|
||||
.src(['./src/main/template/templates.js'])
|
||||
.on('error', log)
|
||||
)
|
||||
.pipe(order(['scripts.js', 'templates.js']))
|
||||
@@ -105,7 +98,9 @@ gulp.task('copy', ['less'], _copy);
|
||||
function _copy() {
|
||||
// copy JavaScript files inside lib folder
|
||||
gulp
|
||||
.src(['./lib/**/*.{js,map}', './node_modules/es5-shim/es5-shim.js'])
|
||||
.src(['./lib/**/*.{js,map}',
|
||||
'./node_modules/es5-shim/es5-shim.js'
|
||||
])
|
||||
.pipe(gulp.dest('./dist/lib'))
|
||||
.on('error', log);
|
||||
|
||||
@@ -159,6 +154,14 @@ function log(error) {
|
||||
console.error(error.toString && error.toString());
|
||||
}
|
||||
|
||||
gulp.task('handlebars', function () {
|
||||
gulp
|
||||
.src(['./src/main/template/templates.js'])
|
||||
.pipe(wrap('/* jshint ignore:start */ \n {<%= contents %>} \n /* jshint ignore:end */'))
|
||||
.pipe(gulp.dest('./src/main/template/'))
|
||||
.on('error', log);
|
||||
});
|
||||
|
||||
gulp.task('default', ['dist', 'copy']);
|
||||
gulp.task('serve', ['connect', 'watch']);
|
||||
gulp.task('dev', ['default'], function () {
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Advertència: Obsolet",
|
||||
"Implementation Notes":"Notes d'implementació",
|
||||
"Response Class":"Classe de la Resposta",
|
||||
"Status":"Estatus",
|
||||
"Parameters":"Paràmetres",
|
||||
"Parameter":"Paràmetre",
|
||||
"Value":"Valor",
|
||||
"Description":"Descripció",
|
||||
"Parameter Type":"Tipus del Paràmetre",
|
||||
"Data Type":"Tipus de la Dada",
|
||||
"Response Messages":"Missatges de la Resposta",
|
||||
"HTTP Status Code":"Codi d'Estatus HTTP",
|
||||
"Reason":"Raó",
|
||||
"Response Model":"Model de la Resposta",
|
||||
"Request URL":"URL de la Sol·licitud",
|
||||
"Response Body":"Cos de la Resposta",
|
||||
"Response Code":"Codi de la Resposta",
|
||||
"Response Headers":"Capçaleres de la Resposta",
|
||||
"Hide Response":"Amagar Resposta",
|
||||
"Try it out!":"Prova-ho!",
|
||||
"Show/Hide":"Mostrar/Amagar",
|
||||
"List Operations":"Llista Operacions",
|
||||
"Expand Operations":"Expandir Operacions",
|
||||
"Raw":"Cru",
|
||||
"can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru",
|
||||
"Example Value":"Valor d'Exemple",
|
||||
"Model Schema":"Esquema del Model",
|
||||
"Model":"Model",
|
||||
"apply":"aplicar",
|
||||
"Username":"Nom d'usuari",
|
||||
"Password":"Contrasenya",
|
||||
"Terms of service":"Termes del servei",
|
||||
"Created by":"Creat per",
|
||||
"See more at":"Veure més en",
|
||||
"Contact the developer":"Contactar amb el desenvolupador",
|
||||
"api version":"versió de la api",
|
||||
"Response Content Type":"Tipus de Contingut de la Resposta",
|
||||
"fetching resource":"recollint recurs",
|
||||
"fetching resource list":"recollins llista de recursos",
|
||||
"Explore":"Explorant",
|
||||
"Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.",
|
||||
"Please specify the protocol for":"Si us plau, especifiqueu el protocol per a",
|
||||
"Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI",
|
||||
"Unable to read api":"No es pot llegir l'api",
|
||||
"from path":"des de la ruta",
|
||||
"server returned":"el servidor ha retornat"
|
||||
});
|
||||
@@ -8,12 +8,13 @@
|
||||
}
|
||||
],
|
||||
"description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
||||
"version": "2.1.5",
|
||||
"version": "2.2.4",
|
||||
"homepage": "http://swagger.io",
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist/swagger-ui.js",
|
||||
"scripts": {
|
||||
"build": "gulp",
|
||||
"build": "npm run handlebars && gulp",
|
||||
"handlebars": "./node_modules/handlebars/bin/handlebars ./src/main/template -f ./src/main/template/templates.js && gulp handlebars",
|
||||
"serve": "gulp serve",
|
||||
"prejshint": "gulp",
|
||||
"jshint": "jshint .",
|
||||
@@ -37,7 +38,6 @@
|
||||
"gulp-concat": "^2.5.2",
|
||||
"gulp-connect": "^2.2.0",
|
||||
"gulp-declare": "^0.3.0",
|
||||
"gulp-handlebars": "^3.0.1",
|
||||
"gulp-header": "^1.2.2",
|
||||
"gulp-jshint": "^1.10.0",
|
||||
"gulp-less": "^3.0.1",
|
||||
@@ -46,6 +46,7 @@
|
||||
"gulp-uglify": "^1.1.0",
|
||||
"gulp-watch": "^4.1.1",
|
||||
"gulp-wrap": "^0.11.0",
|
||||
"handlebars": "^4.0.5",
|
||||
"http-server": "^0.8.0",
|
||||
"jshint-stylish": "^1.0.1",
|
||||
"karma": "0.13.19",
|
||||
@@ -59,6 +60,6 @@
|
||||
"phantomjs": "1.9.19",
|
||||
"selenium-webdriver": "^2.45.0",
|
||||
"sinon-chai": "2.8.0",
|
||||
"swagger-client": "2.1.16"
|
||||
"swagger-client": "2.1.20"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -832,6 +832,11 @@
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p {
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
|
||||
color: black;
|
||||
}
|
||||
|
||||
@@ -832,6 +832,11 @@
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p {
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 770 B After Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 670 B |
@@ -16,7 +16,7 @@
|
||||
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
|
||||
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
|
||||
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
|
||||
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||
@@ -59,7 +59,7 @@
|
||||
clientSecret: "your-client-secret-if-required",
|
||||
realm: "your-realms",
|
||||
appName: "your-app-name",
|
||||
scopeSeparator: ",",
|
||||
scopeSeparator: " ",
|
||||
additionalQueryStringParams: {}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,17 +1,31 @@
|
||||
'use strict';
|
||||
/*jslint eqeq: true*/
|
||||
|
||||
Handlebars.registerHelper('sanitize', function(html) {
|
||||
// Strip the script tags from the html, and return it as a Handlebars.SafeString
|
||||
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
||||
return new Handlebars.SafeString(html);
|
||||
Handlebars.registerHelper('sanitize', function (text) {
|
||||
var result;
|
||||
|
||||
if (text === undefined) { return ''; }
|
||||
|
||||
result = sanitizeHtml(text, {
|
||||
allowedTags: [ 'div', 'span', 'b', 'i', 'em', 'strong', 'a' ],
|
||||
allowedAttributes: {
|
||||
'div': [ 'class' ],
|
||||
'span': [ 'class' ],
|
||||
'a': [ 'href' ]
|
||||
}
|
||||
});
|
||||
|
||||
return new Handlebars.SafeString(result);
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('renderTextParam', function(param) {
|
||||
var result, type = 'text', idAtt = '';
|
||||
var paramType = param.type || param.schema.type || '';
|
||||
var paramType = param.type || param.schema && param.schema.type || '';
|
||||
var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple;
|
||||
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
|
||||
var name = Handlebars.Utils.escapeExpression(param.name);
|
||||
var valueId = Handlebars.Utils.escapeExpression(param.valueId);
|
||||
paramType = Handlebars.Utils.escapeExpression(paramType);
|
||||
|
||||
var dataVendorExtensions = Object.keys(param).filter(function(property) {
|
||||
// filter X-data- properties
|
||||
@@ -21,24 +35,22 @@ Handlebars.registerHelper('renderTextParam', function(param) {
|
||||
return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\'';
|
||||
}, '');
|
||||
|
||||
if (typeof defaultValue === 'undefined') {
|
||||
defaultValue = '';
|
||||
}
|
||||
|
||||
if(param.format && param.format === 'password') {
|
||||
type = 'password';
|
||||
}
|
||||
|
||||
if(param.valueId) {
|
||||
idAtt = ' id=\'' + param.valueId + '\'';
|
||||
if(valueId) {
|
||||
idAtt = ' id=\'' + valueId + '\'';
|
||||
}
|
||||
|
||||
if (typeof defaultValue === 'string' || defaultValue instanceof String) {
|
||||
defaultValue = defaultValue.replace(/'/g,''');
|
||||
if (defaultValue) {
|
||||
defaultValue = sanitizeHtml(defaultValue);
|
||||
} else {
|
||||
defaultValue = '';
|
||||
}
|
||||
|
||||
if(isArray) {
|
||||
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt + dataVendorExtensions;
|
||||
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + name + '\'' + idAtt + dataVendorExtensions;
|
||||
result += ' placeholder=\'Provide multiple values in new lines' + (param.required ? ' (at least one required).' : '.') + '\'>';
|
||||
result += defaultValue + '</textarea>';
|
||||
} else {
|
||||
@@ -47,7 +59,7 @@ Handlebars.registerHelper('renderTextParam', function(param) {
|
||||
parameterClass += ' required';
|
||||
}
|
||||
result = '<input class=\'' + parameterClass + '\' minlength=\'' + (param.required ? 1 : 0) + '\'';
|
||||
result += ' name=\'' + param.name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt + dataVendorExtensions;
|
||||
result += ' name=\'' + name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt + dataVendorExtensions;
|
||||
result += ' type=\'' + type + '\' value=\'' + defaultValue + '\'/>';
|
||||
}
|
||||
return new Handlebars.SafeString(result);
|
||||
@@ -75,4 +87,10 @@ Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
|
||||
default:
|
||||
return options.inverse(this);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('escape', function (value) {
|
||||
var text = Handlebars.Utils.escapeExpression(value);
|
||||
|
||||
return new Handlebars.SafeString(text);
|
||||
});
|
||||
|
||||
@@ -68,5 +68,13 @@ window.SwaggerUi.utils = {
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
sanitize: function(html) {
|
||||
// Strip the script tags from the html and inline evenhandlers
|
||||
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
||||
html = html.replace(/(on\w+="[^"]*")*(on\w+='[^']*')*(on\w+=\w*\(\w*\))*/gi, '');
|
||||
|
||||
return html;
|
||||
}
|
||||
};
|
||||
@@ -4,6 +4,7 @@ SwaggerUi.Views.HeaderView = Backbone.View.extend({
|
||||
events: {
|
||||
'click #show-pet-store-icon' : 'showPetStore',
|
||||
'click #explore' : 'showCustom',
|
||||
'submit #api_selector' : 'showCustom',
|
||||
'keyup #input_baseUrl' : 'showCustomOnKeyup',
|
||||
'keyup #input_apiKey' : 'showCustomOnKeyup'
|
||||
},
|
||||
|
||||
@@ -61,13 +61,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
||||
// Localhost override
|
||||
this.model.validatorUrl = null;
|
||||
} else {
|
||||
// Default validator
|
||||
if(window.location.protocol === 'https:') {
|
||||
this.model.validatorUrl = 'https://online.swagger.io/validator';
|
||||
}
|
||||
else {
|
||||
this.model.validatorUrl = 'http://online.swagger.io/validator';
|
||||
}
|
||||
this.model.validatorUrl = '//online.swagger.io/validator';
|
||||
}
|
||||
|
||||
// JSonEditor requires type='object' to be present on defined types, we add it if it's missing
|
||||
@@ -102,7 +96,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
||||
id = id + '_' + counter;
|
||||
counter += 1;
|
||||
}
|
||||
resource.id = id;
|
||||
resource.id = sanitizeHtml(id);
|
||||
resources[id] = resource;
|
||||
this.addResource(resource, this.model.auths);
|
||||
}
|
||||
|
||||
@@ -651,6 +651,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
|
||||
// puts the response data in UI
|
||||
showStatus: function(response) {
|
||||
console.log(response.headers);
|
||||
var url, content;
|
||||
if (response.content === undefined) {
|
||||
content = response.data;
|
||||
@@ -660,7 +661,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
url = response.request.url;
|
||||
}
|
||||
var headers = response.headers;
|
||||
content = jQuery.trim(content);
|
||||
if(typeof content === 'string') {
|
||||
content = jQuery.trim(content);
|
||||
}
|
||||
|
||||
// if server is nice, and sends content-type back, we can use it
|
||||
var contentType = null;
|
||||
@@ -685,6 +688,36 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
pre = $('<pre class="json" />').append(code);
|
||||
|
||||
// JSON
|
||||
} else if (headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) ||
|
||||
headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) ||
|
||||
headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) ||
|
||||
headers['content-description'] && (/File Transfer/).test(headers['content-description'])) {
|
||||
|
||||
if ('Blob' in window) {
|
||||
var type = contentType || 'text/html';
|
||||
|
||||
var a = document.createElement('a');
|
||||
var href = window.URL.createObjectURL(content);
|
||||
var fileName = response.url.substr(response.url.lastIndexOf('/') + 1);
|
||||
var download = [type, fileName, href].join(':');
|
||||
|
||||
// Use filename from response header
|
||||
var disposition = headers['content-disposition'] || headers['Content-Disposition'];
|
||||
if(typeof disposition !== 'undefined') {
|
||||
var responseFilename = /filename=([^;]*);?/.exec(disposition);
|
||||
if(responseFilename !== null && responseFilename.length > 1) {
|
||||
download = responseFilename[1];
|
||||
}
|
||||
}
|
||||
|
||||
a.setAttribute('href', href);
|
||||
a.setAttribute('download', download);
|
||||
a.innerText = 'Download ' + fileName;
|
||||
|
||||
pre = $('<div/>').append(a);
|
||||
} else {
|
||||
pre = $('<pre class="json" />').append('Download headers detected but your browser does not support downloading binary via XHR (Blob).');
|
||||
}
|
||||
} else if (contentType === 'application/json' || /\+json$/.test(contentType)) {
|
||||
var json = null;
|
||||
try {
|
||||
@@ -710,49 +743,17 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
code = $('<code />').text(content);
|
||||
pre = $('<pre class="plain" />').append(code);
|
||||
|
||||
|
||||
// Image
|
||||
} else if (/^image\//.test(contentType)) {
|
||||
pre = $('<img>').attr('src', url);
|
||||
var urlCreator = window.URL || window.webkitURL;
|
||||
var imageUrl = urlCreator.createObjectURL(content);
|
||||
|
||||
pre = $('<img>').attr( 'src', imageUrl);
|
||||
// Audio
|
||||
} else if (/^audio\//.test(contentType) && supportsAudioPlayback(contentType)) {
|
||||
pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
|
||||
|
||||
// Download
|
||||
} else if (headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) ||
|
||||
headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) ||
|
||||
headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) ||
|
||||
headers['content-description'] && (/File Transfer/).test(headers['content-description'])) {
|
||||
|
||||
if ('Blob' in window) {
|
||||
var type = contentType || 'text/html';
|
||||
var blob = new Blob([content], {type: type});
|
||||
var a = document.createElement('a');
|
||||
var href = window.URL.createObjectURL(blob);
|
||||
var fileName = response.url.substr(response.url.lastIndexOf('/') + 1);
|
||||
var download = [type, fileName, href].join(':');
|
||||
|
||||
// Use filename from response header
|
||||
var disposition = headers['content-disposition'] || headers['Content-Disposition'];
|
||||
if(typeof disposition !== 'undefined') {
|
||||
var responseFilename = /filename=([^;]*);?/.exec(disposition);
|
||||
if(responseFilename !== null && responseFilename.length > 1) {
|
||||
download = responseFilename[1];
|
||||
}
|
||||
}
|
||||
|
||||
a.setAttribute('href', href);
|
||||
a.setAttribute('download', download);
|
||||
a.innerText = 'Download ' + fileName;
|
||||
|
||||
pre = $('<div/>').append(a);
|
||||
} else {
|
||||
pre = $('<pre class="json" />').append('Download headers detected but your browser does not support downloading binary via XHR (Blob).');
|
||||
}
|
||||
|
||||
// Location header based redirect download
|
||||
} else if(headers.location || headers.Location) {
|
||||
// Location header based redirect download
|
||||
window.location = response.url;
|
||||
|
||||
// Anything else (CORS)
|
||||
|
||||
@@ -24,7 +24,6 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
||||
var consumes = this.model.consumes || [];
|
||||
var sampleJSON, signatureView;
|
||||
|
||||
|
||||
if (typeof type === 'undefined') {
|
||||
if (schema.$ref) {
|
||||
var ref = schema.$ref;
|
||||
|
||||
@@ -11,6 +11,7 @@ SwaggerUi.Views.ResourceView = Backbone.View.extend({
|
||||
if (this.model.description) {
|
||||
this.model.summary = this.model.description;
|
||||
}
|
||||
this.number = 0;
|
||||
},
|
||||
|
||||
render: function(){
|
||||
@@ -71,4 +72,4 @@ SwaggerUi.Views.ResourceView = Backbone.View.extend({
|
||||
e.preventDefault();
|
||||
Docs[fnName](e.currentTarget.getAttribute('data-id'));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -703,6 +703,11 @@
|
||||
font-size: 0.9em;
|
||||
a {
|
||||
text-decoration: none;
|
||||
.markdown p {
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<div class="key_input_container">
|
||||
<h3 class="auth__title">Api key authorization</h3>
|
||||
<div class="auth__description">{{description}}</div>
|
||||
<div class="auth__description">{{{sanitize description}}}</div>
|
||||
<div>
|
||||
<div class="key_auth__field">
|
||||
<span class="key_auth__label">name:</span>
|
||||
<span class="key_auth__value">{{name}}</span>
|
||||
<span class="key_auth__value">{{{escape name}}}</span>
|
||||
</div>
|
||||
<div class="key_auth__field">
|
||||
<span class="key_auth__label">in:</span>
|
||||
<span class="key_auth__value">{{in}}</span>
|
||||
<span class="key_auth__value">{{{escape in}}}</span>
|
||||
</div>
|
||||
<div class="key_auth__field">
|
||||
<span class="key_auth__label">value:</span>
|
||||
{{#if isLogout}}
|
||||
<span class="key_auth__value">{{value}}</span>
|
||||
<span class="key_auth__value">{{{sanitize value}}}</span>
|
||||
{{else}}
|
||||
<input placeholder="api_key" class="auth_input input_apiKey_entry" name="apiKey" type="text"/>
|
||||
{{/if}}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{{#if scopes}}
|
||||
<ul class="authorize-scopes">
|
||||
{{#each scopes}}
|
||||
<li class="authorize__scope" title="{{description}}">{{scope}}</li>
|
||||
<li class="authorize__scope" title="{{{escape description}}}">{{{escape scope}}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div class='basic_auth_container'>
|
||||
<h3 class="auth__title">Basic authentication{{#if isLogout}} - authorized{{/if}}</h3>
|
||||
<form class="basic_input_container">
|
||||
<div class="auth__description">{{description}}</div>
|
||||
<div class="auth__description">{{{sanitize description}}}</div>
|
||||
<div class="auth_label">
|
||||
<span class="basic_auth__label" data-sw-translate>username:</span>
|
||||
{{#if isLogout}}
|
||||
<span class="basic_auth__value">{{username}}</span>
|
||||
<span class="basic_auth__value">{{{escape username}}}</span>
|
||||
{{else}}
|
||||
<input required placeholder="username" class="basic_auth__username auth_input" name="username" type="text"/>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<label data-sw-translate for="{{contentTypeId}}">Response Content Type</label>
|
||||
<select name="contentType" id="{{contentTypeId}}">
|
||||
<label data-sw-translate for="{{{escape contentTypeId}}}">Response Content Type</label>
|
||||
<select name="contentType" id="{{{escape contentTypeId}}}">
|
||||
{{#if produces}}
|
||||
{{#each produces}}
|
||||
<option value="{{this}}">{{this}}</option>
|
||||
<option value="{{{sanitize this}}}">{{{sanitize this}}}</option>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<option value="application/json">application/json</option>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<div class='info' id='api_info'>
|
||||
{{#if info}}
|
||||
<div class="info_title">{{info.title}}</div>
|
||||
<div class="info_description markdown">{{{info.description}}}</div>
|
||||
<div class="info_title">{{{sanitize info.title}}}</div>
|
||||
<div class="info_description markdown">{{{sanitize info.description}}}</div>
|
||||
{{#if externalDocs}}
|
||||
<p>{{externalDocs.description}}</p>
|
||||
<a href="{{externalDocs.url}}" target="_blank">{{externalDocs.url}}</a>
|
||||
<p>{{{sanitize externalDocs.description}}}</p>
|
||||
<a href="{{{escape externalDocs.url}}}" target="_blank">{{{escape externalDocs.url}}}</a>
|
||||
{{/if}}
|
||||
{{#if info.termsOfServiceUrl}}<div class="info_tos"><a target="_blank" href="{{info.termsOfServiceUrl}}" data-sw-translate>Terms of service</a></div>{{/if}}
|
||||
{{#if info.contact.name}}<div><div class='info_name' style="display: inline" data-sw-translate>Created by </div> {{info.contact.name}}</div>{{/if}}
|
||||
{{#if info.contact.url}}<div class='info_url' data-sw-translate>See more at <a href="{{info.contact.url}}">{{info.contact.url}}</a></div>{{/if}}
|
||||
{{#if info.contact.email}}<div class='info_email'><a target="_parent" href="mailto:{{info.contact.email}}?subject={{info.title}}" data-sw-translate>Contact the developer</a></div>{{/if}}
|
||||
{{#if info.license}}<div class='info_license'><a target="_blank" href='{{info.license.url}}'>{{info.license.name}}</a></div>{{/if}}
|
||||
{{#if info.termsOfServiceUrl}}<div class="info_tos"><a target="_blank" href="{{{escape info.termsOfServiceUrl}}}" data-sw-translate>Terms of service</a></div>{{/if}}
|
||||
{{#if info.contact.name}}<div><div class='info_name' style="display: inline" data-sw-translate>Created by </div> {{{escape info.contact.name}}}</div>{{/if}}
|
||||
{{#if info.contact.url}}<div class='info_url' data-sw-translate>See more at <a href="{{{escape info.contact.url}}}">{{{escape info.contact.url}}}</a></div>{{/if}}
|
||||
{{#if info.contact.email}}<div class='info_email'><a target="_parent" href="mailto:{{{escape info.contact.email}}}?subject={{{escape info.title}}}" data-sw-translate>Contact the developer</a></div>{{/if}}
|
||||
{{#if info.license}}<div class='info_license'><a target="_blank" href='{{{escape info.license.url}}}'>{{{escape info.license.name}}}</a></div>{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='container' id='resources_container'>
|
||||
@@ -19,12 +19,12 @@
|
||||
<ul id='resources'></ul>
|
||||
|
||||
<div class="footer">
|
||||
<h4 style="color: #999">[ <span style="font-variant: small-caps">base url</span>: {{basePath}}
|
||||
<h4 style="color: #999">[ <span style="font-variant: small-caps">base url</span>: {{{escape basePath}}}
|
||||
{{#if info.version}}
|
||||
, <span style="font-variant: small-caps" data-sw-translate>api version</span>: {{info.version}}
|
||||
, <span style="font-variant: small-caps" data-sw-translate>api version</span>: {{{escape info.version}}}
|
||||
{{/if}}]
|
||||
{{#if validatorUrl}}
|
||||
<span style="float:right"><a target="_blank" href="{{validatorUrl}}/debug?url={{url}}"><img id="validator" src="{{validatorUrl}}?url={{url}}"></a>
|
||||
<span style="float:right"><a target="_blank" href="{{{escape validatorUrl}}}/debug?url={{{escape url}}}"><img id="validator" src="{{{escape validatorUrl}}}?url={{{escape url}}}"></a>
|
||||
</span>
|
||||
{{/if}}
|
||||
</h4>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<div>
|
||||
<h3 class="auth__title">Select OAuth2.0 Scopes</h3>
|
||||
<p>{{description}}</p>
|
||||
<p>{{{sanitize description}}}</p>
|
||||
<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.
|
||||
<a href="#">Learn how to use</a>
|
||||
</p>
|
||||
<p><strong> {{appName}} </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>
|
||||
<p>Authorization URL: {{authorizationUrl}}</p>
|
||||
<p>flow: {{flow}}</p>
|
||||
<p><strong> {{{escape appName}}} </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>
|
||||
<p>Authorization URL: {{{sanitize authorizationUrl}}}</p>
|
||||
<p>flow: {{{escape flow}}}</p>
|
||||
<ul class="api-popup-scopes">
|
||||
{{#each scopes}}
|
||||
<li>
|
||||
<input class="oauth-scope" type="checkbox" data-scope="{{scope}}" oauthtype="{{OAuthSchemeKey}}"/>
|
||||
<label>{{scope}}</label><br/>
|
||||
<span class="api-scope-desc">{{description}}
|
||||
<input class="oauth-scope" type="checkbox" data-scope="{{{escape scope}}}" oauthtype="{{{escape OAuthSchemeKey}}}"/>
|
||||
<label>{{{escape scope}}}</label><br/>
|
||||
<span class="api-scope-desc">{{{escape description}}}
|
||||
{{#if OAuthSchemeKey}}
|
||||
({{OAuthSchemeKey}})
|
||||
({{{escape OAuthSchemeKey}}})
|
||||
{{/if}}
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -1,51 +1,35 @@
|
||||
<ul class='operations' >
|
||||
<li class='{{method}} operation' id='{{parentId}}_{{nickname}}'>
|
||||
<li class='{{{escape method}}} operation' id='{{{escape parentId}}}_{{{escape nickname}}}'>
|
||||
<div class='heading'>
|
||||
<h3>
|
||||
<span class='http_method'>
|
||||
<a href='#!/{{encodedParentId}}/{{nickname}}' class="toggleOperation">{{method}}</a>
|
||||
<a href='#!/{{sanitize encodedParentId}}/{{sanitize nickname}}' class="toggleOperation">{{{escape method}}}</a>
|
||||
</span>
|
||||
<span class='path'>
|
||||
<a href='#!/{{encodedParentId}}/{{nickname}}' class="toggleOperation {{#if deprecated}}deprecated{{/if}}">{{path}}</a>
|
||||
<a href='#!/{{sanitize encodedParentId}}/{{sanitize nickname}}' class="toggleOperation {{#if deprecated}}deprecated{{/if}}">{{{escape path}}}</a>
|
||||
</span>
|
||||
</h3>
|
||||
<ul class='options'>
|
||||
<li>
|
||||
<a href='#!/{{encodedParentId}}/{{nickname}}' class="toggleOperation">{{{summary}}}</a>
|
||||
<a href='#!/{{sanitize encodedParentId}}/{{sanitize nickname}}' class="toggleOperation"><span class="markdown">{{{escape summary}}}</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='content' id='{{parentId}}_{{nickname}}_content' style='display:none'>
|
||||
<div class='content' id='{{sanitize encodedParentId}}_{{sanitize nickname}}_content' style='display:none'>
|
||||
{{#if deprecated}}
|
||||
<h4><span data-sw-translate>Warning: Deprecated</span></h4>
|
||||
{{/if}}
|
||||
{{#if description}}
|
||||
<h4><span data-sw-translate>Implementation Notes</span></h4>
|
||||
<div class="markdown">{{{description}}}</div>
|
||||
<div class="markdown">{{{sanitize description}}}</div>
|
||||
{{/if}}
|
||||
{{#if security}}
|
||||
<div class='authorize-wrapper authorize-wrapper_operation'></div>
|
||||
{{/if}}
|
||||
{{!--{{#oauth}}--}}
|
||||
{{!--<div class="auth">--}}
|
||||
{{!--<span class="api-ic ic-error">{{/oauth}}--}}
|
||||
{{!--{{#each oauth}}--}}
|
||||
{{!--<div class="api_information_panel">--}}
|
||||
{{!--{{#each this}}--}}
|
||||
{{!--<div title='{{{this.description}}}'>{{this.scope}}</div>--}}
|
||||
{{!--{{/each}}--}}
|
||||
{{!--</div>--}}
|
||||
{{!--{{/each}}--}}
|
||||
{{!--{{#oauth}}</span></div>{{/oauth}}--}}
|
||||
{{!--{{#oauth}}--}}
|
||||
{{!--<div class='access'>--}}
|
||||
{{!--<span class="api-ic ic-off" title="click to authenticate"></span>--}}
|
||||
{{!--</div>--}}
|
||||
{{!--{{/oauth}}--}}
|
||||
{{#if type}}
|
||||
<div class="response-class">
|
||||
<h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> {{successCode}})</h4>
|
||||
{{#if successDescription}}<div class="markdown">{{{successDescription}}}</div>{{/if}}
|
||||
<h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> {{{escape successCode}}})</h4>
|
||||
{{#if successDescription}}<div class="markdown">{{{sanitize successDescription}}}</div>{{/if}}
|
||||
<p><span class="model-signature" /></p>
|
||||
<br/>
|
||||
<div class="response-content-type" />
|
||||
@@ -67,9 +51,9 @@
|
||||
{{#each headers}}
|
||||
<tr>
|
||||
<td>{{@key}}</td>
|
||||
<td>{{this.description}}</td>
|
||||
<td>{{this.type}}</td>
|
||||
<td>{{this.other}}</td>
|
||||
<td>{{{sanitize this.description}}}</td>
|
||||
<td>{{{escape this.type}}}</td>
|
||||
<td>{{{escape this.other}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<td class='code'><label for='{{valueId}}'>{{name}}</label></td>
|
||||
<td class='code'><label for='{{{escape valueId}}}'>{{{escape name}}}</label></td>
|
||||
<td>
|
||||
|
||||
{{#if isBody}}
|
||||
{{#if isFile}}
|
||||
<input type="file" name='{{name}}' id='{{valueId}}'/>
|
||||
<input type="file" name='{{{escape name}}}' id='{{{escape valueId}}}'/>
|
||||
<div class="parameter-content-type" />
|
||||
{{else}}
|
||||
{{#if default}}
|
||||
<div class="editor_holder"></div>
|
||||
<textarea class='body-textarea' name='{{name}}' id='{{valueId}}'>{{default}}</textarea>
|
||||
<textarea class='body-textarea' name='{{{escape name}}}' id='{{{escape valueId}}}'>{{{escape default}}}</textarea>
|
||||
<br />
|
||||
<div class="parameter-content-type" />
|
||||
{{else}}
|
||||
<textarea class='body-textarea' name='{{name}}' id='{{valueId}}'></textarea>
|
||||
<textarea class='body-textarea' name='{{{escape name}}}' id='{{{escape valueId}}}'></textarea>
|
||||
<div class="editor_holder"></div>
|
||||
<br />
|
||||
<div class="parameter-content-type" />
|
||||
@@ -20,7 +20,7 @@
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if isFile}}
|
||||
<input type="file" name='{{name}}' id='{{valueId}}'/>
|
||||
<input type="file" name='{{{escape name}}}' id='{{{escape valueId}}}'/>
|
||||
<div class="parameter-content-type" />
|
||||
{{else}}
|
||||
{{#renderTextParam this}}
|
||||
@@ -29,8 +29,8 @@
|
||||
{{/if}}
|
||||
|
||||
</td>
|
||||
<td class="markdown">{{{description}}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td class="markdown">{{{sanitize description}}}</td>
|
||||
<td>{{{escape paramType}}}</td>
|
||||
<td>
|
||||
<span class="model-signature"></span>
|
||||
</td>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<td class='code{{#if required}} required{{/if}}'><label for='{{valueId}}'>{{name}}</label></td>
|
||||
<td class='code{{#if required}} required{{/if}}'><label for='{{{escape valueId}}}'>{{{sanitize name}}}</label></td>
|
||||
<td>
|
||||
<select {{#isArray this}} multiple="multiple"{{/isArray}} class="parameter {{#if required}} required {{/if}}" name="{{name}}" id="{{valueId}}">
|
||||
<select {{#isArray this}} multiple="multiple"{{/isArray}} class="parameter {{#if required}} required {{/if}}" name="{{{sanitize name}}}" id="{{{escape valueId}}}">
|
||||
|
||||
{{#unless required}}
|
||||
<option {{#unless hasDefault}} selected="" {{/unless}} value=''></option>
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
{{#each allowableValues.descriptiveValues}}
|
||||
|
||||
<option {{#if isDefault}} selected="" {{/if}} value='{{value}}'> {{value}} {{#if isDefault}} (default) {{/if}} </option>
|
||||
<option {{#if isDefault}} selected="" {{/if}} value='{{{sanitize value}}}'> {{{sanitize value}}} {{#if isDefault}} (default) {{/if}} </option>
|
||||
|
||||
{{/each}}
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td class="markdown">{{#if required}}<strong>{{/if}}{{{description}}}{{#if required}}</strong>{{/if}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td>{{{escape paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<td class='code'><label for='{{valueId}}'>{{name}}</label></td>
|
||||
<td class='code'><label for='{{{escape valueId}}}'>{{{sanitize name}}}</label></td>
|
||||
<td>
|
||||
{{#if isBody}}
|
||||
<textarea class='body-textarea' readonly='readonly' name='{{name}}' id='{{valueId}}'>{{default}}</textarea>
|
||||
<textarea class='body-textarea' readonly='readonly' name='{{{sanitize name}}}' id='{{{escape valueId}}}'>{{{sanitize default}}}</textarea>
|
||||
<div class="parameter-content-type" />
|
||||
{{else}}
|
||||
{{#if default}}
|
||||
{{default}}
|
||||
{{{sanitize default}}}
|
||||
{{else}}
|
||||
(empty)
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="markdown">{{{description}}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td class="markdown">{{{sanitize description}}}</td>
|
||||
<td>{{{escape paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<td class='code required'><label for='{{valueId}}'>{{name}}</label></td>
|
||||
<td class='code required'><label for='{{{escape valueId}}}'>{{{sanitize name}}}</label></td>
|
||||
<td>
|
||||
{{#if isBody}}
|
||||
<textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='{{name}}' id='{{valueId}}'>{{default}}</textarea>
|
||||
<textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='{{{sanitize name}}}' id='{{{escape valueId}}}'>{{{sanitize default}}}</textarea>
|
||||
{{else}}
|
||||
{{#if default}}
|
||||
{{default}}
|
||||
{{{sanitize default}}}
|
||||
{{else}}
|
||||
(empty)
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="markdown">{{{description}}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td class="markdown">{{{sanitize description}}}</td>
|
||||
<td>{{{escape paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<td class='code required'><label for='{{valueId}}'>{{name}}</label></td>
|
||||
<td class='code required'><label for='{{{escape valueId}}}'>{{{escape name}}}</label></td>
|
||||
<td>
|
||||
{{#if isBody}}
|
||||
{{#if isFile}}
|
||||
<input type="file" name='{{name}}' id='{{valueId}}'/>
|
||||
<input type="file" name='{{{escape name}}}' id='{{{escape valueId}}}'/>
|
||||
{{else}}
|
||||
{{#if default}}
|
||||
<div class="editor_holder"></div>
|
||||
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}' id="{{valueId}}">{{default}}</textarea>
|
||||
<textarea class='body-textarea required' placeholder='(required)' name='{{{sanitize name}}}' id="{{{escape valueId}}}">{{{sanitize default}}}</textarea>
|
||||
<br />
|
||||
<div class="parameter-content-type" />
|
||||
{{else}}
|
||||
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}' id='{{valueId}}'></textarea>
|
||||
<textarea class='body-textarea required' placeholder='(required)' name='{{{sanitize name}}}' id='{{{escape valueId}}}'></textarea>
|
||||
<div class="editor_holder"></div>
|
||||
<br />
|
||||
<div class="parameter-content-type" />
|
||||
@@ -18,7 +18,7 @@
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if isFile}}
|
||||
<input class='parameter' class='required' type='file' name='{{name}}' id='{{valueId}}'/>
|
||||
<input class='parameter' class='required' type='file' name='{{{sanitize name}}}' id='{{{escape valueId}}}'/>
|
||||
{{else}}
|
||||
{{#renderTextParam this}}
|
||||
{{/renderTextParam}}
|
||||
@@ -26,7 +26,7 @@
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<strong><span class="markdown">{{{description}}}</span></strong>
|
||||
<strong><span class="markdown">{{{sanitize description}}}</span></strong>
|
||||
</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td>{{{escape paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<label for="{{parameterContentTypeId}}" data-sw-translate>Parameter content type:</label>
|
||||
<select name="parameterContentType" id="{{parameterContentTypeId}}">
|
||||
<select name="parameterContentType" id="{{{sanitize parameterContentTypeId}}}">
|
||||
{{#if consumes}}
|
||||
{{#each consumes}}
|
||||
<option value="{{this}}">{{this}}</option>
|
||||
<option value="{{{sanitize this}}}">{{{sanitize this}}}</option>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<option value="application/json">application/json</option>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<div class='heading'>
|
||||
<h2>
|
||||
<a href='#!/{{id}}' class="toggleEndpointList" data-id="{{id}}">{{name}}</a> {{#summary}} : {{/summary}}{{{summary}}}
|
||||
<a href='#!/{{{sanitize id}}}' class="toggleEndpointList" data-id="{{{sanitize id}}}">{{{sanitize name}}}</a> {{#summary}} : {{/summary}}{{{sanitize summary}}}
|
||||
</h2>
|
||||
<ul class='options'>
|
||||
<li>
|
||||
<a href='#!/{{id}}' id='endpointListTogger_{{id}}' class="toggleEndpointList" data-id="{{id}}" data-sw-translate>Show/Hide</a>
|
||||
<a href='#!/{{{sanitize id}}}' id='endpointListTogger_{{{sanitize id}}}' class="toggleEndpointList" data-id="{{{sanitize id}}}" data-sw-translate>Show/Hide</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='#' class="collapseResource" data-id="{{id}}" data-sw-translate>
|
||||
<a href='#' class="collapseResource" data-id="{{{sanitize id}}}" data-sw-translate>
|
||||
List Operations
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='#' class="expandResource" data-id="{{id}}" data-sw-translate>
|
||||
<a href='#' class="expandResource" data-id="{{{sanitize id}}}" data-sw-translate>
|
||||
Expand Operations
|
||||
</a>
|
||||
</li>
|
||||
{{#if url}}
|
||||
<li>
|
||||
<a href='{{url}}' data-sw-translate>Raw</a>
|
||||
<a href='{{{sanitize url}}}' data-sw-translate>Raw</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
<ul class='endpoints' id='{{id}}_endpoint_list' style='display:none'>
|
||||
<ul class='endpoints' id='{{{sanitize id}}}_endpoint_list' style='display:none'>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<select name="responseContentType" id="{{responseContentTypeId}}">
|
||||
{{#if produces}}
|
||||
{{#each produces}}
|
||||
<option value="{{this}}">{{this}}</option>
|
||||
<option value="{{{sanitize this}}}">{{{sanitize this}}}</option>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<option value="application/json">application/json</option>
|
||||
|
||||
@@ -9,24 +9,24 @@
|
||||
|
||||
<div class="signature-container">
|
||||
<div class="description">
|
||||
{{{signature}}}
|
||||
{{sanitize signature}}
|
||||
</div>
|
||||
|
||||
<div class="snippet">
|
||||
{{#if sampleJSON}}
|
||||
<div class="snippet_json">
|
||||
<pre><code>{{sampleJSON}}</code></pre>
|
||||
<pre><code>{{{escape sampleJSON}}}</code></pre>
|
||||
{{#if isParam}}<small class="notice" data-sw-translate></small>{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if sampleXML}}
|
||||
<div class="snippet_xml">
|
||||
<pre><code>{{sampleXML}}</code></pre>
|
||||
<pre><code>{{{escape sampleXML}}}</code></pre>
|
||||
{{#if isParam}}<small class="notice" data-sw-translate></small>{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{signature}}
|
||||
{{{escape signature}}}
|
||||
{{/ifCond}}
|
||||
@@ -1,5 +1,5 @@
|
||||
<td width='15%' class='code'>{{code}}</td>
|
||||
<td class="markdown">{{{message}}}</td>
|
||||
<td width='15%' class='code'>{{{escape code}}}</td>
|
||||
<td class="markdown">{{{escape message}}}</td>
|
||||
<td width='50%'><span class="model-signature" /></td>
|
||||
<td class="headers">
|
||||
<table>
|
||||
@@ -7,8 +7,8 @@
|
||||
{{#each headers}}
|
||||
<tr>
|
||||
<td>{{@key}}</td>
|
||||
<td>{{this.description}}</td>
|
||||
<td>{{this.type}}</td>
|
||||
<td>{{{sanitize this.description}}}</td>
|
||||
<td>{{{escape this.type}}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
||||
@@ -0,0 +1,768 @@
|
||||
/* jshint ignore:start */
|
||||
{(function() {
|
||||
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
||||
templates['apikey_auth'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " <span class=\"key_auth__value\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</span>\n";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
return " <input placeholder=\"api_key\" class=\"auth_input input_apiKey_entry\" name=\"apiKey\" type=\"text\"/>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<div class=\"key_input_container\">\n <h3 class=\"auth__title\">Api key authorization</h3>\n <div class=\"auth__description\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</div>\n <div>\n <div class=\"key_auth__field\">\n <span class=\"key_auth__label\">name:</span>\n <span class=\"key_auth__value\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</span>\n </div>\n <div class=\"key_auth__field\">\n <span class=\"key_auth__label\">in:</span>\n <span class=\"key_auth__value\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0["in"] : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</span>\n </div>\n <div class=\"key_auth__field\">\n <span class=\"key_auth__label\">value:</span>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ " </div>\n </div>\n</div>\n";
|
||||
},"useData":true});
|
||||
templates['auth_button'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
return "<a class='authorize__btn' href=\"#\">Authorize</a>\n";
|
||||
},"useData":true});
|
||||
templates['auth_button_operation'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
return " authorize__btn_operation_login\n";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
return " authorize__btn_operation_logout\n";
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " <ul class=\"authorize-scopes\">\n"
|
||||
+ ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </ul>\n";
|
||||
},"6":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <li class=\"authorize__scope\" title=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</li>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return "<div class=\"authorize__btn authorize__btn_operation\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "\">\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "</div>\n";
|
||||
},"useData":true});
|
||||
templates['auth_view'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
return " <button type=\"button\" class=\"auth__button auth_submit__button\" data-sw-translate>Authorize</button>\n";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
return " <button type=\"button\" class=\"auth__button auth_logout__button\" data-sw-translate>Logout</button>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return "<div class=\"auth_container\">\n\n <div class=\"auth_inner\"></div>\n <div class=\"auth_submit\">\n"
|
||||
+ ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isAuthorized : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </div>\n\n</div>\n";
|
||||
},"useData":true});
|
||||
templates['basic_auth'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
return " - authorized";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " <span class=\"basic_auth__value\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.username : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</span>\n";
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
return " <input required placeholder=\"username\" class=\"basic_auth__username auth_input\" name=\"username\" type=\"text\"/>\n";
|
||||
},"7":function(container,depth0,helpers,partials,data) {
|
||||
return " <div class=\"auth_label\">\n <span class=\"basic_auth__label\" data-sw-translate>password:</span>\n <input required placeholder=\"password\" class=\"basic_auth__password auth_input\" name=\"password\" type=\"password\"/></label>\n </div>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return "<div class='basic_auth_container'>\n <h3 class=\"auth__title\">Basic authentication"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "</h3>\n <form class=\"basic_input_container\">\n <div class=\"auth__description\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</div>\n <div class=\"auth_label\">\n <span class=\"basic_auth__label\" data-sw-translate>username:</span>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ " </div>\n"
|
||||
+ ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </form>\n</div>\n";
|
||||
},"useData":true});
|
||||
templates['content_type'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <option value=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</option>\n";
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
return " <option value=\"application/json\">application/json</option>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<label data-sw-translate for=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.contentTypeId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">Response Content Type</label>\n<select name=\"contentType\" id=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.contentTypeId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.produces : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "</select>\n";
|
||||
},"useData":true});
|
||||
templates['main'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <div class=\"info_title\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</div>\n <div class=\"info_description markdown\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</div>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.externalDocs : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " "
|
||||
+ ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n "
|
||||
+ ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n "
|
||||
+ ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n "
|
||||
+ ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n "
|
||||
+ ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n";
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <p>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</p>\n <a href=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" target=\"_blank\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</a>\n";
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return "<div class=\"info_tos\"><a target=\"_blank\" href=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" data-sw-translate>Terms of service</a></div>";
|
||||
},"6":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return "<div><div class='info_name' style=\"display: inline\" data-sw-translate>Created by </div> "
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</div>";
|
||||
},"8":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<div class='info_url' data-sw-translate>See more at <a href=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</a></div>";
|
||||
},"10":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<div class='info_email'><a target=\"_parent\" href=\"mailto:"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "?subject="
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" data-sw-translate>Contact the developer</a></div>";
|
||||
},"12":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<div class='info_license'><a target=\"_blank\" href='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.name : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</a></div>";
|
||||
},"14":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " , <span style=\"font-variant: small-caps\" data-sw-translate>api version</span>: "
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\n ";
|
||||
},"16":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <span style=\"float:right\"><a target=\"_blank\" href=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "/debug?url="
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\"><img id=\"validator\" src=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "?url="
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\"></a>\n </span>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return "<div class='info' id='api_info'>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.info : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "</div>\n<div class='container' id='resources_container'>\n <div class='authorize-wrapper'></div>\n\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.basePath : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "]\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </h4>\n </div>\n</div>\n";
|
||||
},"useData":true});
|
||||
templates['oauth2'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <li>\n <input class=\"oauth-scope\" type=\"checkbox\" data-scope=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" oauthtype=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\"/>\n <label>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</label><br/>\n <span class=\"api-scope-desc\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </span>\n </li>\n";
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " ("
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ ")\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<div>\n <h3 class=\"auth__title\">Select OAuth2.0 Scopes</h3>\n <p>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</p>\n <p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n <a href=\"#\">Learn how to use</a>\n </p>\n <p><strong> "
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.appName : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ " </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>\n <p>Authorization URL: "
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.authorizationUrl : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</p>\n <p>flow: "
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.flow : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</p>\n <ul class=\"api-popup-scopes\">\n"
|
||||
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </ul>\n</div>";
|
||||
},"useData":true});
|
||||
templates['operation'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
return "deprecated";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
return " <h4><span data-sw-translate>Warning: Deprecated</span></h4>\n";
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " <h4><span data-sw-translate>Implementation Notes</span></h4>\n <div class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</div>\n";
|
||||
},"7":function(container,depth0,helpers,partials,data) {
|
||||
return " <div class='authorize-wrapper authorize-wrapper_operation'></div>\n";
|
||||
},"9":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return " <div class=\"response-class\">\n <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> "
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.successCode : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ ")</h4>\n "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.successDescription : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n </div>\n";
|
||||
},"10":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return "<div class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.successDescription : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</div>";
|
||||
},"12":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " <h4 data-sw-translate>Headers</h4>\n <table class=\"headers\">\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Header</th>\n <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Description</th>\n <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Type</th>\n <th style=\"width: 320px; max-width: 320px\" data-sw-translate>Other</th>\n </tr>\n </thead>\n <tbody>\n"
|
||||
+ ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </tbody>\n </table>\n";
|
||||
},"13":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <tr>\n <td>"
|
||||
+ container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper)))
|
||||
+ "</td>\n <td>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n <td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n <td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.other : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n </tr>\n";
|
||||
},"15":function(container,depth0,helpers,partials,data) {
|
||||
return " <h4 data-sw-translate>Parameters</h4>\n <table class='fullwidth parameters'>\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter</th>\n <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Value</th>\n <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Description</th>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter Type</th>\n <th style=\"width: 220px; max-width: 230px\" data-sw-translate>Data Type</th>\n </tr>\n </thead>\n <tbody class=\"operation-params\">\n\n </tbody>\n </table>\n";
|
||||
},"17":function(container,depth0,helpers,partials,data) {
|
||||
return " <div style='margin:0;padding:0;display:inline'></div>\n <h4 data-sw-translate>Response Messages</h4>\n <table class='fullwidth response-messages'>\n <thead>\n <tr>\n <th data-sw-translate>HTTP Status Code</th>\n <th data-sw-translate>Reason</th>\n <th data-sw-translate>Response Model</th>\n <th data-sw-translate>Headers</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n </tbody>\n </table>\n";
|
||||
},"19":function(container,depth0,helpers,partials,data) {
|
||||
return "";
|
||||
},"21":function(container,depth0,helpers,partials,data) {
|
||||
return " <div class='sandbox_header'>\n <input class='submit' type='submit' value='Try it out!' data-sw-translate/>\n <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n";
|
||||
},"23":function(container,depth0,helpers,partials,data) {
|
||||
return " <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3=container.escapeExpression;
|
||||
|
||||
return " <ul class='operations' >\n <li class='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.method : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ " operation' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.parentId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "_"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "/"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "' class=\"toggleOperation\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.method : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</a>\n </span>\n <span class='path'>\n <a href='#!/"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "/"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "' class=\"toggleOperation "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.deprecated : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.path : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "/"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "' class=\"toggleOperation\"><span class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.summary : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</span></a>\n </li>\n </ul>\n </div>\n <div class='content' id='"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "_"
|
||||
+ alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "_content' style='display:none'>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.deprecated : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.security : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.headers : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.parameters : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.responseMessages : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isReadOnly : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.program(21, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ " </form>\n <div class='response' style='display:none'>\n <h4 class='curl'>Curl</h4>\n <div class='block curl'></div>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.showRequestHeaders : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " <h4 data-sw-translate>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-sw-translate>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-sw-translate>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n";
|
||||
},"useData":true});
|
||||
templates['param'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <input type=\"file\" name='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'/>\n <div class=\"parameter-content-type\" />\n";
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <div class=\"editor_holder\"></div>\n <textarea class='body-textarea' name='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||
},"7":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <textarea class='body-textarea' name='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'></textarea>\n <div class=\"editor_holder\"></div>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||
},"9":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"10":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
|
||||
},"11":function(container,depth0,helpers,partials,data) {
|
||||
return "";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<td class='code'><label for='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</label></td>\n<td>\n\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "\n</td>\n<td class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n";
|
||||
},"useData":true});
|
||||
templates['param_list'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
return " required";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
return " multiple=\"multiple\"";
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
return " required ";
|
||||
},"7":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " <option "
|
||||
+ ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.hasDefault : depth0),{"name":"unless","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " value=''></option>\n";
|
||||
},"8":function(container,depth0,helpers,partials,data) {
|
||||
return " selected=\"\" ";
|
||||
},"10":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "\n <option "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isDefault : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " value='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'> "
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ " "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isDefault : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </option>\n\n";
|
||||
},"11":function(container,depth0,helpers,partials,data) {
|
||||
return " selected=\"\" ";
|
||||
},"13":function(container,depth0,helpers,partials,data) {
|
||||
return " (default) ";
|
||||
},"15":function(container,depth0,helpers,partials,data) {
|
||||
return "<strong>";
|
||||
},"17":function(container,depth0,helpers,partials,data) {
|
||||
return "</strong>";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<td class='code"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "'><label for='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</label></td>\n<td>\n <select "
|
||||
+ ((stack1 = (helpers.isArray || (depth0 && depth0.isArray) || alias2).call(alias1,depth0,{"name":"isArray","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " class=\"parameter "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\" name=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" id=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">\n\n"
|
||||
+ ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n"
|
||||
+ ((stack1 = helpers.each.call(alias1,((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n </select>\n</td>\n<td class=\"markdown\">"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"description","hash":{},"data":data}) : helper))) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
||||
},"useData":true});
|
||||
templates['param_readonly'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <textarea class='body-textarea' readonly='readonly' name='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</textarea>\n <div class=\"parameter-content-type\" />\n";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " "
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\n";
|
||||
},"6":function(container,depth0,helpers,partials,data) {
|
||||
return " (empty)\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<td class='code'><label for='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</label></td>\n<td>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
||||
},"useData":true});
|
||||
templates['param_readonly_required'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</textarea>\n";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " "
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\n";
|
||||
},"6":function(container,depth0,helpers,partials,data) {
|
||||
return " (empty)\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<td class='code required'><label for='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</label></td>\n<td>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
||||
},"useData":true});
|
||||
templates['param_required'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <input type=\"file\" name='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'/>\n";
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <div class=\"editor_holder\"></div>\n <textarea class='body-textarea required' placeholder='(required)' name='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id=\""
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||
},"7":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <textarea class='body-textarea required' placeholder='(required)' name='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'></textarea>\n <div class=\"editor_holder\"></div>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||
},"9":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"10":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <input class='parameter' class='required' type='file' name='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'/>\n";
|
||||
},"12":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
|
||||
},"13":function(container,depth0,helpers,partials,data) {
|
||||
return "";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<td class='code required'><label for='"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "'>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</label></td>\n<td>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td>\n <strong><span class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</span></strong>\n</td>\n<td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
||||
},"useData":true});
|
||||
templates['parameter_content_type'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.consumes : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <option value=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</option>\n";
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
return " <option value=\"application/json\">application/json</option>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<label for=\""
|
||||
+ container.escapeExpression(((helper = (helper = helpers.parameterContentTypeId || (depth0 != null ? depth0.parameterContentTypeId : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"parameterContentTypeId","hash":{},"data":data}) : helper)))
|
||||
+ "\" data-sw-translate>Parameter content type:</label>\n<select name=\"parameterContentType\" id=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.parameterContentTypeId : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.consumes : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "</select>\n";
|
||||
},"useData":true});
|
||||
templates['popup'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper;
|
||||
|
||||
return "<div class=\"api-popup-dialog-wrapper\">\n <div class=\"api-popup-title\">"
|
||||
+ container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"title","hash":{},"data":data}) : helper)))
|
||||
+ "</div>\n <div class=\"api-popup-content\"></div>\n <p class=\"error-msg\"></p>\n <div class=\"api-popup-actions\">\n <button class=\"api-popup-cancel api-button gray\" type=\"button\">Cancel</button>\n </div>\n</div>\n<div class=\"api-popup-dialog-shadow\"></div>";
|
||||
},"useData":true});
|
||||
templates['resource'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
return " : ";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " <li>\n <a href='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.url : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' data-sw-translate>Raw</a>\n </li>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, buffer =
|
||||
"<div class='heading'>\n <h2>\n <a href='#!/"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' class=\"toggleEndpointList\" data-id=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</a> ";
|
||||
stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : alias2),(options={"name":"summary","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(alias1,options) : helper));
|
||||
if (!helpers.summary) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)}
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
return buffer + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.summary : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' id='endpointListTogger_"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "' class=\"toggleEndpointList\" data-id=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" data-sw-translate>Show/Hide</a>\n </li>\n <li>\n <a href='#' class=\"collapseResource\" data-id=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" data-sw-translate>\n List Operations\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\" data-sw-translate>\n Expand Operations\n </a>\n </li>\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </ul>\n</div>\n<ul class='endpoints' id='"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "_endpoint_list' style='display:none'>\n\n</ul>\n";
|
||||
},"useData":true});
|
||||
templates['response_content_type'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <option value=\""
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\">"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</option>\n";
|
||||
},"4":function(container,depth0,helpers,partials,data) {
|
||||
return " <option value=\"application/json\">application/json</option>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
|
||||
|
||||
return "<label data-sw-translate for=\""
|
||||
+ alias4(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"responseContentTypeId","hash":{},"data":data}) : helper)))
|
||||
+ "\">Response Content Type</label>\n<select name=\"responseContentType\" id=\""
|
||||
+ alias4(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"responseContentTypeId","hash":{},"data":data}) : helper)))
|
||||
+ "\">\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.produces : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
|
||||
+ "</select>\n";
|
||||
},"useData":true});
|
||||
templates['signature'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return "\n<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\" data-sw-translate>Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n "
|
||||
+ container.escapeExpression((helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.signature : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||
+ "\n </div>\n\n <div class=\"snippet\">\n"
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </div>\n</div>\n";
|
||||
},"2":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return " <div class=\"snippet_json\">\n <pre><code>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</code></pre>\n "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n </div>\n";
|
||||
},"3":function(container,depth0,helpers,partials,data) {
|
||||
return "<small class=\"notice\" data-sw-translate></small>";
|
||||
},"5":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||
|
||||
return " <div class=\"snippet_xml\">\n <pre><code>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</code></pre>\n "
|
||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "\n </div>\n";
|
||||
},"7":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return " "
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.signature : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1;
|
||||
|
||||
return ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.sampleJSON : depth0),"||",(depth0 != null ? depth0.sampleXML : depth0),{"name":"ifCond","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "");
|
||||
},"useData":true});
|
||||
templates['status_code'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return " <tr>\n <td>"
|
||||
+ container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper)))
|
||||
+ "</td>\n <td>"
|
||||
+ ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n <td>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n </tr>\n";
|
||||
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing;
|
||||
|
||||
return "<td width='15%' class='code'>"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.code : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td class=\"markdown\">"
|
||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.message : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
||||
+ "</td>\n<td width='50%'><span class=\"model-signature\" /></td>\n<td class=\"headers\">\n <table>\n <tbody>\n"
|
||||
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </tbody>\n </table>\n</td>";
|
||||
},"useData":true});
|
||||
})();}
|
||||
/* jshint ignore:end */
|
||||
@@ -0,0 +1,53 @@
|
||||
swagger: '2.0'
|
||||
info:
|
||||
version: 0.0.0
|
||||
title: title<script language="javascript">alert('1')</script>
|
||||
description: description with **markdown** format <script language="javascript">alert('2')</script>
|
||||
tags:
|
||||
- name: Admin
|
||||
description: tag with **markdown**
|
||||
- name: Xss<script language="javascript">alert('3')</script>
|
||||
description: tag with **markdown**<script language="javascript">alert('4')</script>
|
||||
paths:
|
||||
/test:
|
||||
get:
|
||||
description: description with **markdown** format
|
||||
summary: a summary with **markdown** format
|
||||
responses:
|
||||
200:
|
||||
description: a description with **markdown** format
|
||||
schema:
|
||||
$ref: '#/definitions/User'
|
||||
post:
|
||||
description: <script language="javascript">alert('5')</script>
|
||||
summary: <script language="javascript">alert('6')</script>
|
||||
consumes:
|
||||
- <script language="javascript">alert('7')</script>
|
||||
produces:
|
||||
- <script language="javascript">alert('8')</script>
|
||||
tags:
|
||||
- Admin tasks<script language="javascript">alert('9')</script>
|
||||
parameters:
|
||||
- in: query
|
||||
name: foo
|
||||
type: string
|
||||
- in: query
|
||||
name: reg
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: nothing<script language="javascript">alert('10')</script>
|
||||
definitions:
|
||||
User:
|
||||
description: also with **markdown**
|
||||
properties:
|
||||
name:
|
||||
description: prop with **markdown**
|
||||
type: string
|
||||
email:
|
||||
$ref: '#/definitions/Email'
|
||||
Email:
|
||||
description: <script language="javascript">alert('11')</script>
|
||||
type: string
|
||||
format: email
|
||||
example: <script language="javascript">alert('12')</script>
|
||||