fix for https://github.com/wordnik/swagger-ui/issues/644, verify path object by type
This commit is contained in:
3
dist/index.html
vendored
3
dist/index.html
vendored
@@ -19,7 +19,7 @@
|
||||
<script src='lib/swagger-client.js' type='text/javascript'></script>
|
||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
||||
|
||||
<script src='spec.js' type='text/javascript'></script>
|
||||
<!-- enabling this will enable oauth2 implicit scope support -->
|
||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||
<script type="text/javascript">
|
||||
@@ -32,6 +32,7 @@
|
||||
}
|
||||
window.swaggerUi = new SwaggerUi({
|
||||
url: url,
|
||||
spec: spec,
|
||||
dom_id: "swagger-ui-container",
|
||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
||||
onComplete: function(swaggerApi, swaggerUi){
|
||||
|
||||
2
dist/lib/swagger-client.js
vendored
2
dist/lib/swagger-client.js
vendored
@@ -412,6 +412,7 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
|
||||
var path;
|
||||
var operations = [];
|
||||
for(path in response.paths) {
|
||||
if(typeof response.paths[path] === 'object') {
|
||||
var httpMethod;
|
||||
for(httpMethod in response.paths[path]) {
|
||||
var operation = response.paths[path][httpMethod];
|
||||
@@ -465,6 +466,7 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.isBuilt = true;
|
||||
if (this.success)
|
||||
this.success();
|
||||
|
||||
@@ -412,6 +412,7 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
|
||||
var path;
|
||||
var operations = [];
|
||||
for(path in response.paths) {
|
||||
if(typeof response.paths[path] === 'object') {
|
||||
var httpMethod;
|
||||
for(httpMethod in response.paths[path]) {
|
||||
var operation = response.paths[path][httpMethod];
|
||||
@@ -465,6 +466,7 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.isBuilt = true;
|
||||
if (this.success)
|
||||
this.success();
|
||||
|
||||
Reference in New Issue
Block a user