removed console log, updated swagger.js
This commit is contained in:
7
dist/lib/swagger.js
vendored
7
dist/lib/swagger.js
vendored
@@ -216,6 +216,7 @@
|
|||||||
produces = [];
|
produces = [];
|
||||||
consumes = [];
|
consumes = [];
|
||||||
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
||||||
|
console.log('using path ' + this.path);
|
||||||
this.description = resourceObj.description;
|
this.description = resourceObj.description;
|
||||||
parts = this.path.split("/");
|
parts = this.path.split("/");
|
||||||
this.name = parts[parts.length - 1].replace('.{format}', '');
|
this.name = parts[parts.length - 1].replace('.{format}', '');
|
||||||
@@ -230,7 +231,11 @@
|
|||||||
if (this.path == null) {
|
if (this.path == null) {
|
||||||
this.api.fail("SwaggerResources must have a path.");
|
this.api.fail("SwaggerResources must have a path.");
|
||||||
}
|
}
|
||||||
this.url = this.api.basePath + this.path.replace('{format}', 'json');
|
if (this.path.substring(0, 4) === 'http') {
|
||||||
|
this.url = this.path.replace('{format}', 'json');
|
||||||
|
} else {
|
||||||
|
this.url = this.api.basePath + this.path.replace('{format}', 'json');
|
||||||
|
}
|
||||||
this.api.progress('fetching resource ' + this.name + ': ' + this.url);
|
this.api.progress('fetching resource ' + this.name + ': ' + this.url);
|
||||||
obj = {
|
obj = {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
|
|||||||
1
dist/swagger-ui.js
vendored
1
dist/swagger-ui.js
vendored
@@ -1757,7 +1757,6 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
|
|||||||
_ref = this.model.parameters;
|
_ref = this.model.parameters;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
param = _ref[_i];
|
param = _ref[_i];
|
||||||
console.log("looking at " + param.dataType);
|
|
||||||
if (param.dataType.toLowerCase() === 'file') {
|
if (param.dataType.toLowerCase() === 'file') {
|
||||||
if (!contentTypeModel.consumes) {
|
if (!contentTypeModel.consumes) {
|
||||||
console.log("set content type ");
|
console.log("set content type ");
|
||||||
|
|||||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -216,6 +216,7 @@
|
|||||||
produces = [];
|
produces = [];
|
||||||
consumes = [];
|
consumes = [];
|
||||||
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
||||||
|
console.log('using path ' + this.path);
|
||||||
this.description = resourceObj.description;
|
this.description = resourceObj.description;
|
||||||
parts = this.path.split("/");
|
parts = this.path.split("/");
|
||||||
this.name = parts[parts.length - 1].replace('.{format}', '');
|
this.name = parts[parts.length - 1].replace('.{format}', '');
|
||||||
@@ -230,7 +231,11 @@
|
|||||||
if (this.path == null) {
|
if (this.path == null) {
|
||||||
this.api.fail("SwaggerResources must have a path.");
|
this.api.fail("SwaggerResources must have a path.");
|
||||||
}
|
}
|
||||||
this.url = this.api.basePath + this.path.replace('{format}', 'json');
|
if (this.path.substring(0, 4) === 'http') {
|
||||||
|
this.url = this.path.replace('{format}', 'json');
|
||||||
|
} else {
|
||||||
|
this.url = this.api.basePath + this.path.replace('{format}', 'json');
|
||||||
|
}
|
||||||
this.api.progress('fetching resource ' + this.name + ': ' + this.url);
|
this.api.progress('fetching resource ' + this.name + ': ' + this.url);
|
||||||
obj = {
|
obj = {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ class OperationView extends Backbone.View
|
|||||||
contentTypeModel.produces = @model.produces
|
contentTypeModel.produces = @model.produces
|
||||||
|
|
||||||
for param in @model.parameters
|
for param in @model.parameters
|
||||||
console.log "looking at " + param.dataType
|
|
||||||
if param.dataType.toLowerCase() == 'file'
|
if param.dataType.toLowerCase() == 'file'
|
||||||
if !contentTypeModel.consumes
|
if !contentTypeModel.consumes
|
||||||
console.log "set content type "
|
console.log "set content type "
|
||||||
|
|||||||
Reference in New Issue
Block a user