added resource description
This commit is contained in:
19
dist/swagger-ui.js
vendored
19
dist/swagger-ui.js
vendored
@@ -1033,8 +1033,13 @@ function program4(depth0,data) {
|
|||||||
templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) {
|
||||||
this.compilerInfo = [4,'>= 1.0.0'];
|
this.compilerInfo = [4,'>= 1.0.0'];
|
||||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
|
var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
|
||||||
|
|
||||||
|
function program1(depth0,data) {
|
||||||
|
|
||||||
|
|
||||||
|
return " : ";
|
||||||
|
}
|
||||||
|
|
||||||
buffer += "<div class='heading'>\n <h2>\n <a href='#!/";
|
buffer += "<div class='heading'>\n <h2>\n <a href='#!/";
|
||||||
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
||||||
@@ -1048,7 +1053,16 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|||||||
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
||||||
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
||||||
buffer += escapeExpression(stack1)
|
buffer += escapeExpression(stack1)
|
||||||
+ "</a>\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
|
+ "</a> ";
|
||||||
|
options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
|
||||||
|
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, options); }
|
||||||
|
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
||||||
|
if (!helpers.description) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
|
||||||
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||||
|
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
||||||
|
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
||||||
|
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||||
|
buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
|
||||||
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
|
||||||
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
|
||||||
buffer += escapeExpression(stack1)
|
buffer += escapeExpression(stack1)
|
||||||
@@ -1421,6 +1435,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|||||||
|
|
||||||
ResourceView.prototype.render = function() {
|
ResourceView.prototype.render = function() {
|
||||||
var operation, _i, _len, _ref;
|
var operation, _i, _len, _ref;
|
||||||
|
console.log(this.model.description);
|
||||||
$(this.el).html(Handlebars.templates.resource(this.model));
|
$(this.el).html(Handlebars.templates.resource(this.model));
|
||||||
this.number = 0;
|
this.number = 0;
|
||||||
_ref = this.model.operationsArray;
|
_ref = this.model.operationsArray;
|
||||||
|
|||||||
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
@@ -2,6 +2,7 @@ class ResourceView extends Backbone.View
|
|||||||
initialize: ->
|
initialize: ->
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
|
console.log @model.description
|
||||||
$(@el).html(Handlebars.templates.resource(@model))
|
$(@el).html(Handlebars.templates.resource(@model))
|
||||||
|
|
||||||
@number = 0
|
@number = 0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class='heading'>
|
<div class='heading'>
|
||||||
<h2>
|
<h2>
|
||||||
<a href='#!/{{name}}' onclick="Docs.toggleEndpointListForResource('{{name}}');">{{name}}</a>
|
<a href='#!/{{name}}' onclick="Docs.toggleEndpointListForResource('{{name}}');">{{name}}</a> {{#description}} : {{/description}}{{{description}}}
|
||||||
</h2>
|
</h2>
|
||||||
<ul class='options'>
|
<ul class='options'>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
Reference in New Issue
Block a user