readme
This commit is contained in:
25
.gitignore
vendored
25
.gitignore
vendored
@@ -1,12 +1,13 @@
|
||||
.DS_STORE
|
||||
*.ipr
|
||||
*.iml
|
||||
*.iws
|
||||
web/
|
||||
lib/*.zip
|
||||
version.properties
|
||||
.sass-cache
|
||||
swagger-ui.sublime-workspace
|
||||
.idea
|
||||
.project
|
||||
node_modules/*
|
||||
.DS_STORE
|
||||
*.ipr
|
||||
*.iml
|
||||
*.iws
|
||||
web/
|
||||
lib/*.zip
|
||||
version.properties
|
||||
.sass-cache
|
||||
swagger-ui.sublime-workspace
|
||||
.idea
|
||||
.project
|
||||
node_modules/*
|
||||
/nbproject/private/
|
||||
26
README.md
26
README.md
@@ -57,6 +57,7 @@ Once you open the Swagger UI, it will load the [Swagger Petstore](http://petstor
|
||||
You may choose to customize Swagger UI for your organization. Here is an overview of whats in its various directories:
|
||||
|
||||
- dist: Contains a distribution which you can deploy on a server or load from your local machine.
|
||||
- dist/lang: The swagger localisation
|
||||
- lib: Contains javascript dependencies which swagger-ui depends on
|
||||
- node_modules: Contains node modules which swagger-ui uses for its development.
|
||||
- src
|
||||
@@ -123,6 +124,31 @@ window.authorizations.add("key", new ApiKeyAuthorization("Authorization", "XXXX"
|
||||
|
||||
Note! You can pass multiple header params on a single request, just use unique names for them (`key` is used in the above example).
|
||||
|
||||
### Localisation and translation
|
||||
The localisation files are in the dist/lang directory.
|
||||
|
||||
To enable translation you should append next two lines in your swagger's index.html (or another entry point you use)
|
||||
```html
|
||||
<script src='lang/translator.js' type='text/javascript'></script>
|
||||
<script src='lang/en.js' type='text/javascript'></script>
|
||||
```
|
||||
The first line script is a translator and the second one is your language lexemes.
|
||||
|
||||
If you wish to append support for new language you just need to create lang/your_lang.js and fill it like it's done in existing files.
|
||||
|
||||
To append new lexemex for translation you shoul do two things:
|
||||
1. Add lexeme into the language file.
|
||||
Example of new line: "new sentence":"translation of new sentence".
|
||||
2. Mark this lexeme in source html with attribute data-sw-translate.
|
||||
Example of changed source:
|
||||
```html
|
||||
<anyHtmlTag data-sw-translate>new sentence</anyHtmlTag>
|
||||
or <anyHtmlTag data-sw-translate value='new sentence'/>
|
||||
```
|
||||
.
|
||||
|
||||
At this moment only inner html, title-attribute and value-attribute are going to be translated.
|
||||
|
||||
## CORS Support
|
||||
|
||||
CORS is a technique to prevent websites from doing bad things with your personal data. Most browsers + javascript toolkits not only support CORS but enforce it, which has implications for your API server which supports Swagger.
|
||||
|
||||
3
dist/lang/en.js
vendored
3
dist/lang/en.js
vendored
@@ -1,4 +1,4 @@
|
||||
SwaggerTranslator.learn({this._swaggerLang = {
|
||||
SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Warning: Deprecated",
|
||||
"Implementation Notes":"Implementation Notes",
|
||||
"Response Class":"Response Class",
|
||||
@@ -18,7 +18,6 @@ SwaggerTranslator.learn({this._swaggerLang = {
|
||||
"Response Code":"Response Code",
|
||||
"Response Headers":"Response Headers",
|
||||
"Hide Response":"Hide Response",
|
||||
"Response Messages":"Response Messages",
|
||||
"Try it out!":"Try it out!",
|
||||
"Show/Hide":"Show/Hide",
|
||||
"List Operations":"List Operations",
|
||||
|
||||
6
dist/lang/translator.js
vendored
6
dist/lang/translator.js
vendored
@@ -7,8 +7,8 @@
|
||||
*
|
||||
* If you wish to translate some new texsts you should do two things:
|
||||
* 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too.
|
||||
* 2. Mark that text it templates this way <anyHtmlTag data-swTarnslate>New Phrase</anyHtmlTag> or <anyHtmlTag data-swTarnslate value='New Phrase'/>.
|
||||
* The main thing here is attribute data-swTarnslate. Only inner html, title-attribute and value-attribute are going to translate.
|
||||
* 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>.
|
||||
* The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate.
|
||||
*
|
||||
*/
|
||||
SwaggerTranslator = {
|
||||
@@ -17,7 +17,7 @@ SwaggerTranslator = {
|
||||
|
||||
translate: function() {
|
||||
var $this = this;
|
||||
$("[data-swTarnslate]").each(
|
||||
$("[data-sw-translate]").each(
|
||||
function() {
|
||||
$(this).html(
|
||||
$this._tryTranslate($(this).html())
|
||||
|
||||
14
dist/lib/swagger-client.js
vendored
14
dist/lib/swagger-client.js
vendored
@@ -343,7 +343,7 @@ SwaggerClient.prototype.initialize = function (url, options) {
|
||||
SwaggerClient.prototype.build = function(mock) {
|
||||
if (this.isBuilt) return this;
|
||||
var self = this;
|
||||
this.progress('<span data-swTarnslate="1">fetching resource list</span>: ' + this.url);
|
||||
this.progress('<span data-sw-translate>fetching resource list</span>: ' + this.url);
|
||||
var obj = {
|
||||
useJQuery: this.useJQuery,
|
||||
url: this.url,
|
||||
@@ -354,11 +354,11 @@ SwaggerClient.prototype.build = function(mock) {
|
||||
on: {
|
||||
error: function(response) {
|
||||
if (self.url.substring(0, 4) !== 'http')
|
||||
return self.fail('<span data-swTarnslate="1">Please specify the protocol for</span> ' + self.url);
|
||||
return self.fail('<span data-sw-translate>Please specify the protocol for</span> ' + self.url);
|
||||
else if (response.status === 0)
|
||||
return self.fail('<span data-swTarnslate="1">Can\'t read from server. It may not have the appropriate access-control-origin settings.</span>');
|
||||
return self.fail('<span data-sw-translate>Can\'t read from server. It may not have the appropriate access-control-origin settings.</span>');
|
||||
else if (response.status === 404)
|
||||
return self.fail('<span data-swTarnslate="1">Can\'t read swagger JSON from</span> ' + self.url);
|
||||
return self.fail('<span data-sw-translate>Can\'t read swagger JSON from</span> ' + self.url);
|
||||
else
|
||||
return self.fail(response.status + ' : ' + response.statusText + ' ' + self.url);
|
||||
},
|
||||
@@ -1729,7 +1729,7 @@ var SwaggerResource = function (resourceObj, api) {
|
||||
} else {
|
||||
this.url = this.api.basePath + this.path.replace('{format}', 'json');
|
||||
}
|
||||
this.api.progress('<span data-swTarnslate="1">fetching resource</span> ' + this.name + ': ' + this.url);
|
||||
this.api.progress('<span data-sw-translate>fetching resource</span> ' + this.name + ': ' + this.url);
|
||||
var obj = {
|
||||
url: this.url,
|
||||
method: 'GET',
|
||||
@@ -1745,8 +1745,8 @@ var SwaggerResource = function (resourceObj, api) {
|
||||
},
|
||||
error: function (response) {
|
||||
_this.api.resourceCount += 1;
|
||||
return _this.api.fail('<span data-swTarnslate="1">Unable to read api</span> \'' +
|
||||
_this.name + '\' <span data-swTarnslate="1">from path</span> ' + _this.url + ' (<span data-swTarnslate="1">server returned</span> ' + response.statusText + ')');
|
||||
return _this.api.fail('<span data-sw-translate>Unable to read api</span> \'' +
|
||||
_this.name + '\' <span data-sw-translate>from path</span> ' + _this.url + ' (<span data-sw-translate>server returned</span> ' + response.statusText + ')');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
42
dist/swagger-ui.js
vendored
42
dist/swagger-ui.js
vendored
@@ -425,7 +425,7 @@ Handlebars.registerHelper('sanitize', function(html) {
|
||||
});
|
||||
|
||||
this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
return "<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>\n<div class='auth_container' id='basic_auth_container'>\n <div class='key_input_container'>\n <div class=\"auth_label\" data-swTarnslate='1'>Username</div>\n <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n <div class=\"auth_label\" data-swTarnslate='1'>Password</div>\n <input placeholder=\"password\" class=\"auth_input\" id=\"input_password\" name=\"password\" type=\"password\"/>\n <div class='auth_submit'><a class='auth_submit_button' id=\"apply_basic_auth\" href=\"#\" data-swTarnslate='1'>apply</a></div>\n </div>\n</div>\n\n";
|
||||
return "<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>\n<div class='auth_container' id='basic_auth_container'>\n <div class='key_input_container'>\n <div class=\"auth_label\" data-sw-translate>Username</div>\n <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n <div class=\"auth_label\" data-sw-translate>Password</div>\n <input placeholder=\"password\" class=\"auth_input\" id=\"input_password\" name=\"password\" type=\"password\"/>\n <div class='auth_submit'><a class='auth_submit_button' id=\"apply_basic_auth\" href=\"#\" data-sw-translate>apply</a></div>\n </div>\n</div>\n\n";
|
||||
},"useData":true});
|
||||
var ApiKeyButton,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
@@ -584,15 +584,15 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
|
||||
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
|
||||
return "<div class=\"info_tos\"><a href=\""
|
||||
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), depth0))
|
||||
+ "\" data-swTarnslate='1'>Terms of service</a></div>";
|
||||
+ "\" data-sw-translate>Terms of service</a></div>";
|
||||
},"4":function(depth0,helpers,partials,data) {
|
||||
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
|
||||
return "<div class='info_name'><span data-swTarnslate='1'>Created by</span> "
|
||||
return "<div class='info_name'><span data-sw-translate>Created by</span> "
|
||||
+ escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0))
|
||||
+ "</div>";
|
||||
},"6":function(depth0,helpers,partials,data) {
|
||||
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
|
||||
return "<div class='info_url'><span data-swTarnslate='1'>See more at</span> <a href=\""
|
||||
return "<div class='info_url'><span data-sw-translate>See more at</span> <a href=\""
|
||||
+ escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0))
|
||||
+ "\">"
|
||||
+ escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0))
|
||||
@@ -603,7 +603,7 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
|
||||
+ escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), depth0))
|
||||
+ "?subject="
|
||||
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
|
||||
+ "\" data-swTarnslate='1'>Contact the developer</a></div>";
|
||||
+ "\" data-sw-translate>Contact the developer</a></div>";
|
||||
},"10":function(depth0,helpers,partials,data) {
|
||||
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
|
||||
return "<div class='info_license'><a href='"
|
||||
@@ -613,7 +613,7 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
|
||||
+ "</a></div>";
|
||||
},"12":function(depth0,helpers,partials,data) {
|
||||
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
|
||||
return " , <span style=\"font-variant: small-caps\" data-swTarnslate='1'>api version</span>: "
|
||||
return " , <span style=\"font-variant: small-caps\" data-sw-translate>api version</span>: "
|
||||
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0))
|
||||
+ "\n ";
|
||||
},"14":function(depth0,helpers,partials,data) {
|
||||
@@ -631,7 +631,7 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
|
||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class='info' id='api_info'>\n";
|
||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
buffer += "</div>\n<div class='container' id='resources_container'>\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <br>\n <br>\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\" data-swTarnslate='1'>base url</span>: "
|
||||
buffer += "</div>\n<div class='container' id='resources_container'>\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <br>\n <br>\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\" data-sw-translate>base url</span>: "
|
||||
+ escapeExpression(((helper = (helper = helpers.basePath || (depth0 != null ? depth0.basePath : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"basePath","hash":{},"data":data}) : helper)))
|
||||
+ "\n";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data});
|
||||
@@ -673,9 +673,9 @@ ContentTypeView = (function(_super) {
|
||||
this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||
return "deprecated";
|
||||
},"3":function(depth0,helpers,partials,data) {
|
||||
return " <h4 data-swTarnslate='1'>Warning: Deprecated</h4>\n";
|
||||
return " <h4 data-sw-translate>Warning: Deprecated</h4>\n";
|
||||
},"5":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = " <h4 data-swTarnslate='1'>Implementation Notes</h4>\n <p class=\"markdown\">";
|
||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = " <h4 data-sw-translate>Implementation Notes</h4>\n <p class=\"markdown\">";
|
||||
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
return buffer + "</p>\n";
|
||||
@@ -699,17 +699,17 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
|
||||
return " <div class='access'>\n <span class=\"api-ic ic-off\" title=\"click to authenticate\"></span>\n </div>\n";
|
||||
},"16":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return " <h4><span data-swTarnslate='1'>Response Class</span> (Status "
|
||||
return " <h4><span data-sw-translate>Response Class</span> (Status "
|
||||
+ escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper)))
|
||||
+ ")</h4>\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n";
|
||||
},"18":function(depth0,helpers,partials,data) {
|
||||
return " <h4 data-swTarnslate='1'>Parameters</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\" data-swTarnslate='1'>Parameter</th>\n <th style=\"width: 310px; max-width: 310px\" data-swTarnslate='1'>Value</th>\n <th style=\"width: 200px; max-width: 200px\" data-swTarnslate='1'>Description</th>\n <th style=\"width: 100px; max-width: 100px\" data-swTarnslate='1'>Parameter Type</th>\n <th style=\"width: 220px; max-width: 230px\" data-swTarnslate='1'>Data Type</th>\n </tr>\n </thead>\n <tbody class=\"operation-params\">\n\n </tbody>\n </table>\n";
|
||||
return " <h4 data-sw-translate>Parameters</h4>\n <table class='fullwidth'>\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";
|
||||
},"20":function(depth0,helpers,partials,data) {
|
||||
return " <div style='margin:0;padding:0;display:inline'></div>\n <h4 data-swTarnslate='1'>Response Messages</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th data-swTarnslate='1'>HTTP Status Code</th>\n <th data-swTarnslate='1'>Reason</th>\n <th data-swTarnslate='1'>Response Model</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n \n </tbody>\n </table>\n";
|
||||
return " <div style='margin:0;padding:0;display:inline'></div>\n <h4 data-sw-translate>Response Messages</h4>\n <table class='fullwidth'>\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 </tr>\n </thead>\n <tbody class=\"operation-status\">\n \n </tbody>\n </table>\n";
|
||||
},"22":function(depth0,helpers,partials,data) {
|
||||
return "";
|
||||
},"24":function(depth0,helpers,partials,data) {
|
||||
return " <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' data-swTarnslate value='Try it out!' />\n <a href='#' class='response_hider' style='display:none' data-swTarnslate='1'>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n";
|
||||
return " <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' data-sw-translate value='Try it out!' />\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";
|
||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "\n <ul class='operations' >\n <li class='"
|
||||
+ escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))
|
||||
@@ -771,7 +771,7 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(22, data),"inverse":this.program(24, data),"data":data});
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
return buffer + " </form>\n <div class='response' style='display:none'>\n <h4 data-swTarnslate='1'>Request URL</h4>\n <div class='block request_url'></div>\n <h4 data-swTarnslate='1'>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-swTarnslate='1'>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-swTarnslate='1'>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n";
|
||||
return buffer + " </form>\n <div class='response' style='display:none'>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n <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});
|
||||
var HeaderView,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
@@ -1635,7 +1635,7 @@ OperationView = (function(_super) {
|
||||
json = JSON.stringify(JSON.parse(content), null, " ");
|
||||
} catch (_error) {
|
||||
e = _error;
|
||||
json = "<span data-swTarnslate='1'>can't parse JSON. Raw result</span>:\n\n" + content;
|
||||
json = "<span data-sw-translate>can't parse JSON. Raw result</span>:\n\n" + content;
|
||||
}
|
||||
code = $('<code />').text(json);
|
||||
pre = $('<pre class="json" />').append(code);
|
||||
@@ -2082,7 +2082,7 @@ this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return "<li>\n <a href='"
|
||||
+ escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))
|
||||
+ "' data-swTarnslate='1'>Raw</a>\n </li>";
|
||||
+ "' data-sw-translate>Raw</a>\n </li>";
|
||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "<div class='heading'>\n <h2>\n <a href='#!/"
|
||||
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
@@ -2102,11 +2102,11 @@ this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(
|
||||
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "' class=\"toggleEndpointList\" data-id=\""
|
||||
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\" data-swTarnslate='1'>Show/Hide</a>\n </li>\n <li>\n <a href='#' class=\"collapseResource\" data-id=\""
|
||||
+ "\" data-sw-translate>Show/Hide</a>\n </li>\n <li>\n <a href='#' class=\"collapseResource\" data-id=\""
|
||||
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\">\n <span data-swTarnslate='1'>List Operations</span>\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=\""
|
||||
+ "\">\n <span data-sw-translate>List Operations</span>\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=\""
|
||||
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\">\n <span data-swTarnslate='1'>Expand Operations</span>\n </a>\n </li>\n ";
|
||||
+ "\">\n <span data-sw-translate>Expand Operations</span>\n </a>\n </li>\n ";
|
||||
stack1 = ((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(options={"name":"url","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
|
||||
if (!helpers.url) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
@@ -2202,7 +2202,7 @@ this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({
|
||||
},"4":function(depth0,helpers,partials,data) {
|
||||
return " <option value=\"application/json\">application/json</option>\n";
|
||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var stack1, buffer = "<label for=\"responseContentType\" data-swTarnslate=1></label>\n<select name=\"responseContentType\">\n";
|
||||
var stack1, buffer = "<label for=\"responseContentType\" data-sw-translate=1></label>\n<select name=\"responseContentType\">\n";
|
||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
return buffer + "</select>\n";
|
||||
@@ -2250,7 +2250,7 @@ StatusCodeView = (function(_super) {
|
||||
})(Backbone.View);
|
||||
|
||||
this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\" data-swTarnslate='1'>Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\" data-swTarnslate='1'>Model Schema</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n ";
|
||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<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>Model Schema</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n ";
|
||||
stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper));
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
return buffer + "\n </div>\n\n <div class=\"snippet\">\n <pre><code>"
|
||||
|
||||
Reference in New Issue
Block a user