Bring back "Raw" link for 1.2 specs

This commit is contained in:
Mohsen Azimi
2015-03-06 14:31:45 -08:00
parent 87433d6d09
commit 998cfc72b1
5 changed files with 14 additions and 13 deletions

2
dist/index.html vendored
View File

@@ -56,7 +56,7 @@
});
function addApiKeyAuthorization() {
var key = $('#input_apiKey')[0].value;
var key = encodeURIComponent($('#input_apiKey')[0].value);
log("key: " + key);
if(key && key.trim() != "") {
log("added key " + key);

11
dist/swagger-ui.js vendored
View File

@@ -909,9 +909,9 @@ this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(
return " : ";
},"3":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "<li>\n <a href='"
return " <li>\n <a href='"
+ escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))
+ "'>Raw</a>\n </li>";
+ "'>Raw</a>\n </li>\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "<div class='heading'>\n <h2>\n <a href='#!/"
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
@@ -935,11 +935,10 @@ this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\">\n List Operations\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=\""
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\">\n Expand Operations\n </a>\n </li>\n ";
stack1 = ((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(options={"name":"url","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers.url) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+ "\">\n Expand Operations\n </a>\n </li>\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.url : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + "\n </ul>\n</div>\n<ul class='endpoints' id='"
return buffer + " </ul>\n</div>\n<ul class='endpoints' id='"
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "_endpoint_list' style='display:none'>\n\n</ul>\n";
},"useData":true});

File diff suppressed because one or more lines are too long

View File

@@ -25,12 +25,12 @@ class ResourceView extends Backbone.View
operation.nickname = id
operation.parentId = @model.id
@addOperation operation
@addOperation operation
$('.toggleEndpointList', @el).click(this.callDocs.bind(this, 'toggleEndpointListForResource'))
$('.collapseResource', @el).click(this.callDocs.bind(this, 'collapseOperationsForResource'))
$('.expandResource', @el).click(this.callDocs.bind(this, 'expandOperationsForResource'))
return @
addOperation: (operation) ->

View File

@@ -16,9 +16,11 @@
Expand Operations
</a>
</li>
{{#url}}<li>
{{#if url}}
<li>
<a href='{{url}}'>Raw</a>
</li>{{/url}}
</li>
{{/if}}
</ul>
</div>
<ul class='endpoints' id='{{id}}_endpoint_list' style='display:none'>