瀏覽代碼

fix for #606, renamed resource to in the template

bubble
Tony Tam 10 年之前
父節點
當前提交
af6eed4eb4
共有 4 個文件被更改,包括 12 次插入7 次删除
  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 查看文件

@@ -1087,12 +1087,12 @@ function program1(depth0,data) {
buffer += escapeExpression(stack1)
+ "</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 = 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 = 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; }
buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
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;
$(this.el).html(Handlebars.templates.resource(this.model));
methods = {};
if (this.model.description) {
this.model.summary = this.model.description;
}
_ref4 = this.model.operationsArray;
for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
operation = _ref4[_i];


+ 1
- 1
dist/swagger-ui.min.js
文件差異過大導致無法顯示
查看文件


+ 2
- 0
src/main/coffeescript/view/ResourceView.coffee 查看文件

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

methods = {}

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


+ 1
- 1
src/main/template/resource.handlebars 查看文件

@@ -1,6 +1,6 @@
<div class='heading'>
<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>
<ul class='options'>
<li>


Loading…
取消
儲存