updated client, converted newlines to br in description
This commit is contained in:
1
dist/lib/swagger-client.js
vendored
1
dist/lib/swagger-client.js
vendored
@@ -406,6 +406,7 @@ var Operation = function(parent, operationId, httpMethod, path, args, definition
|
|||||||
this.responses = (args.responses||{});
|
this.responses = (args.responses||{});
|
||||||
this.type = null;
|
this.type = null;
|
||||||
this.security = args.security;
|
this.security = args.security;
|
||||||
|
this.description = args.description;
|
||||||
|
|
||||||
var i;
|
var i;
|
||||||
for(i = 0; i < this.parameters.length; i++) {
|
for(i = 0; i < this.parameters.length; i++) {
|
||||||
|
|||||||
12
dist/swagger-ui.js
vendored
12
dist/swagger-ui.js
vendored
@@ -319,8 +319,8 @@ function program1(depth0,data) {
|
|||||||
|
|
||||||
var buffer = "", stack1;
|
var buffer = "", stack1;
|
||||||
buffer += "\n <h4>Implementation Notes</h4>\n <p>";
|
buffer += "\n <h4>Implementation Notes</h4>\n <p>";
|
||||||
if (stack1 = helpers.notes) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
||||||
else { stack1 = depth0.notes; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
||||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||||
buffer += "</p>\n ";
|
buffer += "</p>\n ";
|
||||||
return buffer;
|
return buffer;
|
||||||
@@ -452,7 +452,7 @@ function program20(depth0,data) {
|
|||||||
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
else { stack1 = depth0.nickname; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
||||||
buffer += escapeExpression(stack1)
|
buffer += escapeExpression(stack1)
|
||||||
+ "_content' style='display:none'>\n ";
|
+ "_content' style='display:none'>\n ";
|
||||||
stack1 = helpers['if'].call(depth0, depth0.notes, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
stack1 = helpers['if'].call(depth0, depth0.description, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||||
buffer += "\n ";
|
buffer += "\n ";
|
||||||
options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
|
options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data};
|
||||||
@@ -1471,7 +1471,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
log(this.model);
|
log(this.model);
|
||||||
if (this.model.info.license && typeof this.model.info.license === 'string') {
|
if (this.model.info && this.model.info.license && typeof this.model.info.license === 'string') {
|
||||||
name = this.model.info.license;
|
name = this.model.info.license;
|
||||||
url = this.model.info.licenseUrl;
|
url = this.model.info.licenseUrl;
|
||||||
this.model.info.license = {};
|
this.model.info.license = {};
|
||||||
@@ -1642,6 +1642,10 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|||||||
if (!isMethodSubmissionSupported) {
|
if (!isMethodSubmissionSupported) {
|
||||||
this.model.isReadOnly = true;
|
this.model.isReadOnly = true;
|
||||||
}
|
}
|
||||||
|
this.model.description = this.model.description || this.model.notes;
|
||||||
|
if (this.model.description) {
|
||||||
|
this.model.description = this.model.description.replace(/(?:\r\n|\r|\n)/g, '<br />');
|
||||||
|
}
|
||||||
this.model.oauth = null;
|
this.model.oauth = null;
|
||||||
if (this.model.authorizations) {
|
if (this.model.authorizations) {
|
||||||
_ref5 = this.model.authorizations;
|
_ref5 = this.model.authorizations;
|
||||||
|
|||||||
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
@@ -406,6 +406,7 @@ var Operation = function(parent, operationId, httpMethod, path, args, definition
|
|||||||
this.responses = (args.responses||{});
|
this.responses = (args.responses||{});
|
||||||
this.type = null;
|
this.type = null;
|
||||||
this.security = args.security;
|
this.security = args.security;
|
||||||
|
this.description = args.description;
|
||||||
|
|
||||||
var i;
|
var i;
|
||||||
for(i = 0; i < this.parameters.length; i++) {
|
for(i = 0; i < this.parameters.length; i++) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class MainView extends Backbone.View
|
|||||||
@model.apisArray.sort sorter
|
@model.apisArray.sort sorter
|
||||||
|
|
||||||
log @model
|
log @model
|
||||||
if @model.info.license and typeof @model.info.license is 'string'
|
if @model.info and @model.info.license and typeof @model.info.license is 'string'
|
||||||
name = @model.info.license
|
name = @model.info.license
|
||||||
url = @model.info.licenseUrl
|
url = @model.info.licenseUrl
|
||||||
@model.info.license = {}
|
@model.info.license = {}
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ class OperationView extends Backbone.View
|
|||||||
isMethodSubmissionSupported = true #jQuery.inArray(@model.method, @model.supportedSubmitMethods) >= 0
|
isMethodSubmissionSupported = true #jQuery.inArray(@model.method, @model.supportedSubmitMethods) >= 0
|
||||||
@model.isReadOnly = true unless isMethodSubmissionSupported
|
@model.isReadOnly = true unless isMethodSubmissionSupported
|
||||||
|
|
||||||
|
# 1.2 syntax for description was `notes`
|
||||||
|
@model.description = (@model.description || @model.notes)
|
||||||
|
if @model.description
|
||||||
|
@model.description = @model.description.replace(/(?:\r\n|\r|\n)/g, '<br />')
|
||||||
@model.oauth = null
|
@model.oauth = null
|
||||||
if @model.authorizations
|
if @model.authorizations
|
||||||
for k, v of @model.authorizations
|
for k, v of @model.authorizations
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class='content' id='{{parentId}}_{{nickname}}_content' style='display:none'>
|
<div class='content' id='{{parentId}}_{{nickname}}_content' style='display:none'>
|
||||||
{{#if notes}}
|
{{#if description}}
|
||||||
<h4>Implementation Notes</h4>
|
<h4>Implementation Notes</h4>
|
||||||
<p>{{{notes}}}</p>
|
<p>{{{description}}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#oauth}}
|
{{#oauth}}
|
||||||
<div class="auth">
|
<div class="auth">
|
||||||
|
|||||||
Reference in New Issue
Block a user