2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -26,7 +26,7 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
var url = window.location.search.match(/url=([^&]+)/);
|
var url = window.location.search.match(/url=([^&]+)/);
|
||||||
if (url && url.length > 1) {
|
if (url && url.length > 1) {
|
||||||
url = url[1];
|
url = decodeURIComponent(url[1]);
|
||||||
} else {
|
} else {
|
||||||
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
||||||
}
|
}
|
||||||
|
|||||||
112
dist/swagger-ui.js
vendored
112
dist/swagger-ui.js
vendored
@@ -869,6 +869,62 @@ this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(dep
|
|||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n";
|
return buffer + "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
|
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
|
return " multiple='multiple'";
|
||||||
|
},"3":function(depth0,helpers,partials,data) {
|
||||||
|
return "";
|
||||||
|
},"5":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"6":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helperMissing=helpers.helperMissing, buffer = "";
|
||||||
|
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.program(7, data),"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"7":function(depth0,helpers,partials,data) {
|
||||||
|
return " <option selected=\"\" value=''></option>\n";
|
||||||
|
},"9":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"10":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <option selected=\"\" value='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ " (default)</option>\n";
|
||||||
|
},"12":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <option value='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</option>\n";
|
||||||
|
},"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 = "<td class='code'>"
|
||||||
|
+ 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)))
|
||||||
|
+ "</td>\n<td>\n <select ";
|
||||||
|
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += " class='parameter' name='"
|
||||||
|
+ 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)))
|
||||||
|
+ "'>\n";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += " </select>\n</td>\n<td 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; }
|
||||||
|
buffer += "</td>\n<td>";
|
||||||
|
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>";
|
||||||
|
},"useData":true});
|
||||||
var MainView,
|
var MainView,
|
||||||
__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; },
|
__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; },
|
||||||
__hasProp = {}.hasOwnProperty;
|
__hasProp = {}.hasOwnProperty;
|
||||||
@@ -995,62 +1051,6 @@ MainView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
|
||||||
return " multiple='multiple'";
|
|
||||||
},"3":function(depth0,helpers,partials,data) {
|
|
||||||
return "";
|
|
||||||
},"5":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"6":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, helperMissing=helpers.helperMissing, buffer = "";
|
|
||||||
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.program(7, data),"data":data}));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"7":function(depth0,helpers,partials,data) {
|
|
||||||
return " <option selected=\"\" value=''></option>\n";
|
|
||||||
},"9":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"10":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <option selected=\"\" value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ " (default)</option>\n";
|
|
||||||
},"12":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <option value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</option>\n";
|
|
||||||
},"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 = "<td class='code'>"
|
|
||||||
+ 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)))
|
|
||||||
+ "</td>\n<td>\n <select ";
|
|
||||||
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += " class='parameter' name='"
|
|
||||||
+ 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)))
|
|
||||||
+ "'>\n";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += " </select>\n</td>\n<td 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; }
|
|
||||||
buffer += "</td>\n<td>";
|
|
||||||
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>";
|
|
||||||
},"useData":true});
|
|
||||||
this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":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 " <textarea class='body-textarea' readonly='readonly' name='"
|
return " <textarea class='body-textarea' readonly='readonly' name='"
|
||||||
|
|||||||
4
dist/swagger-ui.min.js
vendored
4
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -24,9 +24,9 @@
|
|||||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var url = decodeURIComponent(window.location.search.match(/url=([^&]+)/));
|
var url = window.location.search.match(/url=([^&]+)/);
|
||||||
if (url && url.length > 1) {
|
if (url && url.length > 1) {
|
||||||
url = url[1];
|
url = decodeURIComponent(url[1]);
|
||||||
} else {
|
} else {
|
||||||
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,33 @@ describe('basics', function (done) {
|
|||||||
checkConsoleErrors();
|
checkConsoleErrors();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
describe('should render key elements in document', function () {
|
||||||
|
var elementQueries = [
|
||||||
|
'swagger-ui-container',
|
||||||
|
'resources_container',
|
||||||
|
'api_info',
|
||||||
|
'resource_pet',
|
||||||
|
'resource_store',
|
||||||
|
'resource_user',
|
||||||
|
'header'
|
||||||
|
];
|
||||||
|
|
||||||
|
this.timeout(10000);
|
||||||
|
|
||||||
|
elementQueries.forEach(function (id) {
|
||||||
|
|
||||||
|
it('should render element: ' + id, function (done) {
|
||||||
|
|
||||||
|
var locator = webdriver.By.id(id)
|
||||||
|
driver.isElementPresent(locator).then(function (isPresent) {
|
||||||
|
expect(isPresent).to.be.true;
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
describe('cleanup', function () {
|
describe('cleanup', function () {
|
||||||
it('kills the static server', function () {
|
it('kills the static server', function () {
|
||||||
server.close();
|
server.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user