Missing some data-sw-translation

This commit is contained in:
Francisco Guimarães
2015-07-23 01:03:41 -03:00
5 changed files with 97 additions and 78 deletions

5
dist/lang/pt.js vendored
View File

@@ -25,8 +25,13 @@ window.SwaggerTranslator.learn({
"Show/Hide":"Mostrar/Esconder", "Show/Hide":"Mostrar/Esconder",
"List Operations":"Listar operações", "List Operations":"Listar operações",
"Expand Operations":"Expandir operações", "Expand Operations":"Expandir operações",
<<<<<<< HEAD
"Raw":"Cru", "Raw":"Cru",
"can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru", "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru",
=======
"Raw":"Raw",
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
>>>>>>> stable
"Model Schema":"Modelo esquema", "Model Schema":"Modelo esquema",
"Model":"Modelo", "Model":"Modelo",
"apply":"Aplicar", "apply":"Aplicar",

115
dist/swagger-ui.js vendored
View File

@@ -2,7 +2,7 @@
* swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
* @version v2.1.0 * @version v2.1.0
* @link http://swagger.io * @link http://swagger.io
* @license Apache 2.0 * @license Apache-2.0
*/ */
(function(){'use strict'; (function(){'use strict';
@@ -179,9 +179,13 @@ window.SwaggerUi = Backbone.Router.extend({
if (data === undefined) { if (data === undefined) {
data = ''; data = '';
} }
$('#message-bar').removeClass('message-fail'); var $msgbar = $('#message-bar');
$('#message-bar').addClass('message-success'); $msgbar.removeClass('message-fail');
$('#message-bar').text(data); $msgbar.addClass('message-success');
$msgbar.html(data);
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate($msgbar);
}
}, },
// shows message in red // shows message in red
@@ -259,7 +263,7 @@ window.SwaggerUi.Views = {};
}); });
} else if (typeof exports === 'object') { } else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but // Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports, // only CommonJS-like environments that support module.exports,
// like Node. // like Node.
module.exports = factory(require('b')); module.exports = factory(require('b'));
} else { } else {
@@ -276,10 +280,10 @@ this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"co
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n <div class='key_input_container'>\n <div class='auth_label'><label for='input_apiKey_entry'>" return "<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n <div class='key_input_container'>\n <div class='auth_label'><label for='input_apiKey_entry'>"
+ escapeExpression(((helper = (helper = helpers.keyName || (depth0 != null ? depth0.keyName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"keyName","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.keyName || (depth0 != null ? depth0.keyName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"keyName","hash":{},"data":data}) : helper)))
+ "</label></div>\n <input placeholder='api_key' class='auth_input' id='input_apiKey_entry' name='apiKey' type='text'/>\n <div class='auth_submit'><a class='auth_submit_button' id='apply_api_key' href='#''>apply</a></div>\n </div>\n</div>\n\n"; + "</label></div>\n <input placeholder='api_key' class='auth_input' id='input_apiKey_entry' name='apiKey' type='text'/>\n <div class='auth_submit'><a class='auth_submit_button' id='apply_api_key' href='#' data-sw-translate>apply</a></div>\n </div>\n</div>\n";
},"useData":true}); },"useData":true});
this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { 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\"><label for=\"input_username\">Username</label></div>\n <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n <div class=\"auth_label\"><label for=\"password\">Password</label></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=\"#\">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\"><label for=\"input_username\" data-sw-translate>Username</label></div>\n <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n <div class=\"auth_label\"><label for=\"password\" data-sw-translate>Password</label></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=\"#\">apply</a></div>\n </div>\n</div>\n\n";
},"useData":true}); },"useData":true});
this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var stack1, buffer = ""; var stack1, buffer = "";
@@ -519,6 +523,14 @@ Handlebars.registerHelper('renderTextParam', function(param) {
var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple; var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple;
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
var dataVendorExtensions = Object.keys(param).filter(function(property) {
// filter X-data- properties
return property.match(/^X-data-/i) !== null;
}).reduce(function(result, property) {
// remove X- from property name, so it results in html attributes like data-foo='bar'
return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\'';
}, '');
if (typeof defaultValue === 'undefined') { if (typeof defaultValue === 'undefined') {
defaultValue = ''; defaultValue = '';
} }
@@ -532,7 +544,7 @@ Handlebars.registerHelper('renderTextParam', function(param) {
} }
if(isArray) { if(isArray) {
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt; result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt + dataVendorExtensions;
result += ' placeholder=\'Provide multiple values in new lines' + (param.required ? ' (at least one required).' : '.') + '\'>'; result += ' placeholder=\'Provide multiple values in new lines' + (param.required ? ' (at least one required).' : '.') + '\'>';
result += defaultValue + '</textarea>'; result += defaultValue + '</textarea>';
} else { } else {
@@ -541,7 +553,7 @@ Handlebars.registerHelper('renderTextParam', function(param) {
parameterClass += ' required'; parameterClass += ' required';
} }
result = '<input class=\'' + parameterClass + '\' minlength=\'' + (param.required ? 1 : 0) + '\''; result = '<input class=\'' + parameterClass + '\' minlength=\'' + (param.required ? 1 : 0) + '\'';
result += ' name=\'' + param.name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt; result += ' name=\'' + param.name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt + dataVendorExtensions;
result += ' type=\'' + type + '\' value=\'' + defaultValue + '\'/>'; result += ' type=\'' + type + '\' value=\'' + defaultValue + '\'/>';
} }
return new Handlebars.SafeString(result); return new Handlebars.SafeString(result);
@@ -585,15 +597,15 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
return "<div class=\"info_tos\"><a href=\"" return "<div class=\"info_tos\"><a href=\""
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), depth0)) + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), depth0))
+ "\">Terms of service</a></div>"; + "\" data-sw-translate>Terms of service</a></div>";
},"6":function(depth0,helpers,partials,data) { },"6":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
return "<div class='info_name'>Created by " return "<div class='info_name' data-sw-translate>Created by "
+ escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0)) + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0))
+ "</div>"; + "</div>";
},"8":function(depth0,helpers,partials,data) { },"8":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
return "<div class='info_url'>See more at <a href=\"" return "<div class='info_url' data-sw-translate>See more at <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))
+ "\">" + "\">"
+ 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))
@@ -604,7 +616,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)) + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), depth0))
+ "?subject=" + "?subject="
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
+ "\">Contact the developer</a></div>"; + "\" data-sw-translate>Contact the developer</a></div>";
},"12":function(depth0,helpers,partials,data) { },"12":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
return "<div class='info_license'><a href='" return "<div class='info_license'><a href='"
@@ -614,7 +626,7 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
+ "</a></div>"; + "</a></div>";
},"14":function(depth0,helpers,partials,data) { },"14":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
return " , <span style=\"font-variant: small-caps\">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)) + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0))
+ "\n "; + "\n ";
},"16":function(depth0,helpers,partials,data) { },"16":function(depth0,helpers,partials,data) {
@@ -652,9 +664,9 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
if (stack1 != null) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "</div>\n"; return buffer + "</div>\n";
},"7":function(depth0,helpers,partials,data) { },"7":function(depth0,helpers,partials,data) {
return " <div class=\"auth\">\n <span class=\"api-ic ic-error\"></span>"; return " <div class=\"auth\">\n <span class=\"api-ic ic-error\">";
},"9":function(depth0,helpers,partials,data) { },"9":function(depth0,helpers,partials,data) {
var stack1, buffer = " <div id=\"api_information_panel\" style=\"top: 526px; left: 776px; display: none;\">\n"; var stack1, buffer = " <div class=\"api_information_panel\">\n";
stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + " </div>\n"; return buffer + " </div>\n";
@@ -666,24 +678,24 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
+ escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0)) + escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0))
+ "</div>\n"; + "</div>\n";
},"12":function(depth0,helpers,partials,data) { },"12":function(depth0,helpers,partials,data) {
return "</div>"; return "</span></div>";
},"14":function(depth0,helpers,partials,data) { },"14":function(depth0,helpers,partials,data) {
return " <div class='access'>\n <span class=\"api-ic ic-off\" title=\"click to authenticate\"></span>\n </div>\n"; 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) { },"16":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <h4>Response Class (Status " return " <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> "
+ 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))) + 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"; + ")</h4>\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n";
},"18":function(depth0,helpers,partials,data) { },"18":function(depth0,helpers,partials,data) {
return " <h4>Parameters</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\">Parameter</th>\n <th style=\"width: 310px; max-width: 310px\">Value</th>\n <th style=\"width: 200px; max-width: 200px\">Description</th>\n <th style=\"width: 100px; max-width: 100px\">Parameter Type</th>\n <th style=\"width: 220px; max-width: 230px\">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) { },"20":function(depth0,helpers,partials,data) {
return " <div style='margin:0;padding:0;display:inline'></div>\n <h4>Response Messages</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th>HTTP Status Code</th>\n <th>Reason</th>\n <th>Response Model</th>\n <th>Headers</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 <th data-sw-translate>Headers</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n\n </tbody>\n </table>\n";
},"22":function(depth0,helpers,partials,data) { },"22":function(depth0,helpers,partials,data) {
return ""; return "";
},"24":function(depth0,helpers,partials,data) { },"24":function(depth0,helpers,partials,data) {
return " <div class='sandbox_header'>\n <input class='submit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n"; return " <div class='sandbox_header'>\n <input class='submit' type='button' 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";
},"26":function(depth0,helpers,partials,data) { },"26":function(depth0,helpers,partials,data) {
return " <h4>Request Headers</h4>\n <div class='block request_headers'></div>\n"; return " <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { },"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='" 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))) + 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)))
@@ -745,10 +757,10 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
if (stack1 != null) { buffer += stack1; } 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}); 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; } if (stack1 != null) { buffer += stack1; }
buffer += " </form>\n <div class='response' style='display:none'>\n <h4>Curl</h4>\n <div class='block curl'></div>\n <h4>Request URL</h4>\n <div class='block request_url'></div>\n"; buffer += " </form>\n <div class='response' style='display:none'>\n <h4>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(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(26, data),"inverse":this.noop,"data":data}); stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(26, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + " <h4>Response Body</h4>\n <div class='block response_body'></div>\n <h4>Response Code</h4>\n <div class='block response_code'></div>\n <h4>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n"; return buffer + " <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}); },"useData":true});
this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var stack1, buffer = ""; var stack1, buffer = "";
@@ -852,7 +864,7 @@ this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":functio
+ escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))
+ "'>" + "'>"
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ "</labe></td>\n<td>\n <select "; + "</label></td>\n<td>\n <select ";
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data})); stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}));
if (stack1 != null) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
buffer += " class=\"parameter "; buffer += " class=\"parameter ";
@@ -1053,7 +1065,7 @@ this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <li>\n <a href='" 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))) + 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)))
+ "'>Raw</a>\n </li>\n"; + "' data-sw-translate>Raw</a>\n </li>\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { },"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='#!/" 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))) + 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)))
@@ -1073,11 +1085,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))) + 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=\"" + "' 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))) + 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)))
+ "\">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))) + 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 List Operations\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=\"" + "\" data-sw-translate>\n List Operations\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))) + 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 Expand Operations\n </a>\n </li>\n"; + "\" data-sw-translate>\n Expand Operations\n </a>\n </li>\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.url : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}); stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.url : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + " </ul>\n</div>\n<ul class='endpoints' id='" return buffer + " </ul>\n</div>\n<ul class='endpoints' id='"
@@ -1110,7 +1122,7 @@ this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({
return buffer + "</select>\n"; return buffer + "</select>\n";
},"useData":true}); },"useData":true});
this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { 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=\"#\">Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\">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)); 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; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n </div>\n\n <div class=\"snippet\">\n <pre><code>" return buffer + "\n </div>\n\n <div class=\"snippet\">\n <pre><code>"
@@ -31066,7 +31078,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
this.model.validatorUrl = null; this.model.validatorUrl = null;
} else { } else {
// Default validator // Default validator
if(window.location.protocol === 'https') { if(window.location.protocol === 'https:') {
this.model.validatorUrl = 'https://online.swagger.io/validator'; this.model.validatorUrl = 'https://online.swagger.io/validator';
} }
else { else {
@@ -31151,7 +31163,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
'click .response_hider' : 'hideResponse', 'click .response_hider' : 'hideResponse',
'click .toggleOperation' : 'toggleOperationContent', 'click .toggleOperation' : 'toggleOperationContent',
'mouseenter .api-ic' : 'mouseEnter', 'mouseenter .api-ic' : 'mouseEnter',
'mouseout .api-ic' : 'mouseExit',
'dblclick .curl' : 'selectText', 'dblclick .curl' : 'selectText',
}, },
@@ -31175,7 +31186,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
range.moveToElementText(text); range.moveToElementText(text);
range.select(); range.select();
} else if (window.getSelection) { } else if (window.getSelection) {
selection = window.getSelection(); selection = window.getSelection();
range = document.createRange(); range = document.createRange();
range.selectNodeContents(text); range.selectNodeContents(text);
selection.removeAllRanges(); selection.removeAllRanges();
@@ -31214,11 +31225,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
pos.top = y; pos.top = y;
pos.left = x; pos.left = x;
elem.css(pos); elem.css(pos);
$(e.currentTarget.parentNode).find('#api_information_panel').show();
},
mouseExit: function(e) {
$(e.currentTarget.parentNode).find('#api_information_panel').hide();
}, },
// Note: copied from CoffeeScript compiled file // Note: copied from CoffeeScript compiled file
@@ -31237,22 +31243,23 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
for (l = 0, len = modelAuths.length; l < len; l++) { for (l = 0, len = modelAuths.length; l < len; l++) {
auths = modelAuths[l]; auths = modelAuths[l];
for (key in auths) { for (key in auths) {
auth = auths[key];
for (a in this.auths) { for (a in this.auths) {
auth = this.auths[a]; auth = this.auths[a];
if (auth.type === 'oauth2') { if (key === auth.name) {
this.model.oauth = {}; if (auth.type === 'oauth2') {
this.model.oauth.scopes = []; this.model.oauth = {};
ref1 = auth.value.scopes; this.model.oauth.scopes = [];
for (k in ref1) { ref1 = auth.value.scopes;
v = ref1[k]; for (k in ref1) {
scopeIndex = auths[key].indexOf(k); v = ref1[k];
if (scopeIndex >= 0) { scopeIndex = auths[key].indexOf(k);
o = { if (scopeIndex >= 0) {
scope: k, o = {
description: v scope: k,
}; description: v
this.model.oauth.scopes.push(o); };
this.model.oauth.scopes.push(o);
}
} }
} }
} }
@@ -32118,7 +32125,9 @@ SwaggerUi.Views.SignatureView = Backbone.View.extend({
if (e) { e.preventDefault(); } if (e) { e.preventDefault(); }
var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode)); var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode));
if ($.trim(textArea.val()) === '') {
// Fix for bug in IE 10/11 which causes placeholder text to be copied to "value"
if ($.trim(textArea.val()) === '' || textArea.prop('placeholder') === textArea.val()) {
textArea.val(this.model.sampleJSON); textArea.val(this.model.sampleJSON);
} }
} }

File diff suppressed because one or more lines are too long

View File

@@ -25,8 +25,13 @@ window.SwaggerTranslator.learn({
"Show/Hide":"Mostrar/Esconder", "Show/Hide":"Mostrar/Esconder",
"List Operations":"Listar operações", "List Operations":"Listar operações",
"Expand Operations":"Expandir operações", "Expand Operations":"Expandir operações",
<<<<<<< HEAD
"Raw":"Cru", "Raw":"Cru",
"can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru", "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru",
=======
"Raw":"Raw",
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
>>>>>>> stable
"Model Schema":"Modelo esquema", "Model Schema":"Modelo esquema",
"Model":"Modelo", "Model":"Modelo",
"apply":"Aplicar", "apply":"Aplicar",

View File

@@ -49,15 +49,15 @@
<form accept-charset='UTF-8' class='sandbox'> <form accept-charset='UTF-8' class='sandbox'>
<div style='margin:0;padding:0;display:inline'></div> <div style='margin:0;padding:0;display:inline'></div>
{{#if parameters}} {{#if parameters}}
<h4>Parameters</h4> <h4 data-sw-translate>Parameters</h4>
<table class='fullwidth'> <table class='fullwidth'>
<thead> <thead>
<tr> <tr>
<th style="width: 100px; max-width: 100px">Parameter</th> <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter</th>
<th style="width: 310px; max-width: 310px">Value</th> <th style="width: 310px; max-width: 310px" data-sw-translate>Value</th>
<th style="width: 200px; max-width: 200px">Description</th> <th style="width: 200px; max-width: 200px" data-sw-translate>Description</th>
<th style="width: 100px; max-width: 100px">Parameter Type</th> <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter Type</th>
<th style="width: 220px; max-width: 230px">Data Type</th> <th style="width: 220px; max-width: 230px" data-sw-translate>Data Type</th>
</tr> </tr>
</thead> </thead>
<tbody class="operation-params"> <tbody class="operation-params">
@@ -67,14 +67,14 @@
{{/if}} {{/if}}
{{#if responseMessages}} {{#if responseMessages}}
<div style='margin:0;padding:0;display:inline'></div> <div style='margin:0;padding:0;display:inline'></div>
<h4>Response Messages</h4> <h4 data-sw-translate>Response Messages</h4>
<table class='fullwidth'> <table class='fullwidth'>
<thead> <thead>
<tr> <tr>
<th>HTTP Status Code</th> <th data-sw-translate>HTTP Status Code</th>
<th>Reason</th> <th data-sw-translate>Reason</th>
<th>Response Model</th> <th data-sw-translate>Response Model</th>
<th>Headers</th> <th data-sw-translate>Headers</th>
</tr> </tr>
</thead> </thead>
<tbody class="operation-status"> <tbody class="operation-status">
@@ -85,8 +85,8 @@
{{#if isReadOnly}} {{#if isReadOnly}}
{{else}} {{else}}
<div class='sandbox_header'> <div class='sandbox_header'>
<input class='submit' type='button' value='Try it out!' /> <input class='submit' type='button' value='Try it out!' data-sw-translate/>
<a href='#' class='response_hider' style='display:none'>Hide Response</a> <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>
<span class='response_throbber' style='display:none'></span> <span class='response_throbber' style='display:none'></span>
</div> </div>
{{/if}} {{/if}}