Browse Source

fix for #606, renamed resource to in the template

bubble
Tony Tam 10 years ago
parent
commit
af6eed4eb4
4 changed files with 12 additions and 7 deletions
  1. +8
    -5
      dist/swagger-ui.js
  2. +1
    -1
      dist/swagger-ui.min.js
  3. +2
    -0
      src/main/coffeescript/view/ResourceView.coffee
  4. +1
    -1
      src/main/template/resource.handlebars

+ 8
- 5
dist/swagger-ui.js View File

@@ -1087,12 +1087,12 @@ function program1(depth0,data) {
buffer += escapeExpression(stack1) buffer += escapeExpression(stack1)
+ "</a> "; + "</a> ";
options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}; 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 = helpers.summary) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.summary; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.summary) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; } 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 = helpers.summary) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.summary; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if(stack1 || stack1 === 0) { buffer += stack1; } if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/"; buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); } if (stack1 = helpers.id) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
@@ -1539,6 +1539,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
var counter, id, methods, operation, _i, _len, _ref4; var counter, id, methods, operation, _i, _len, _ref4;
$(this.el).html(Handlebars.templates.resource(this.model)); $(this.el).html(Handlebars.templates.resource(this.model));
methods = {}; methods = {};
if (this.model.description) {
this.model.summary = this.model.description;
}
_ref4 = this.model.operationsArray; _ref4 = this.model.operationsArray;
for (_i = 0, _len = _ref4.length; _i < _len; _i++) { for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
operation = _ref4[_i]; operation = _ref4[_i];


+ 1
- 1
dist/swagger-ui.min.js
File diff suppressed because it is too large
View File


+ 2
- 0
src/main/coffeescript/view/ResourceView.coffee View File

@@ -8,6 +8,8 @@ class ResourceView extends Backbone.View


methods = {} methods = {}


if @model.description
@model.summary = @model.description
# Render each operation # Render each operation
for operation in @model.operationsArray for operation in @model.operationsArray
counter = 0 counter = 0


+ 1
- 1
src/main/template/resource.handlebars View File

@@ -1,6 +1,6 @@
<div class='heading'> <div class='heading'>
<h2> <h2>
<a href='#!/{{id}}' class="toggleEndpointList" data-id="{{id}}">{{name}}</a> {{#description}} : {{/description}}{{{description}}}
<a href='#!/{{id}}' class="toggleEndpointList" data-id="{{id}}">{{name}}</a> {{#summary}} : {{/summary}}{{{summary}}}
</h2> </h2>
<ul class='options'> <ul class='options'>
<li> <li>


Loading…
Cancel
Save