This commit is contained in:
Tony Tam
2016-01-29 16:14:33 -08:00
8 changed files with 30 additions and 26 deletions

2
dist/css/print.css vendored
View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

2
dist/css/screen.css vendored
View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

18
dist/swagger-ui.js vendored
View File

@@ -417,12 +417,12 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
},"14":function(depth0,helpers,partials,data) { },"14":function(depth0,helpers,partials,data) {
return " <div class='access'>\n <span class=\"api-ic ic-off\" title=\"click to authenticate\"></span>\n </div>\n"; return " <div class='access'>\n <span class=\"api-ic ic-off\" title=\"click to authenticate\"></span>\n </div>\n";
},"16":function(depth0,helpers,partials,data) { },"16":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = " <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> " var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = " <div class=\"response-class\">\n <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> "
+ escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper)))
+ ")</h4>\n "; + ")</h4>\n ";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.successDescription : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data}); stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.successDescription : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n\n"; return buffer + "\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n </div>\n";
},"17":function(depth0,helpers,partials,data) { },"17":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "<div class=\"markdown\">"; var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "<div class=\"markdown\">";
stack1 = ((helper = (helper = helpers.successDescription || (depth0 != null ? depth0.successDescription : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successDescription","hash":{},"data":data}) : helper)); stack1 = ((helper = (helper = helpers.successDescription || (depth0 != null ? depth0.successDescription : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successDescription","hash":{},"data":data}) : helper));
@@ -455,7 +455,7 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
},"30":function(depth0,helpers,partials,data) { },"30":function(depth0,helpers,partials,data) {
return " <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n"; return " <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { },"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 = "\n <ul class='operations' >\n <li class='" var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = " <ul class='operations' >\n <li class='"
+ escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))
+ " operation' id='" + " operation' id='"
+ escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
@@ -26098,17 +26098,19 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
showSnippet: function () { showSnippet: function () {
var contentTypeEl = this.$('[name=responseContentType]'); var contentTypeEl = this.$('[name=responseContentType]');
var xmlSnippetEl = this.$('.operation-status .snippet_xml, .response-class .snippet_xml');
var jsonSnippetEl = this.$('.operation-status .snippet_json, .response-class .snippet_json');
var contentType; var contentType;
if (!contentTypeEl.length) { return; } if (!contentTypeEl.length) { return; }
contentType = contentTypeEl.val(); contentType = contentTypeEl.val();
if (contentType.indexOf('xml') > -1) { if (contentType.indexOf('xml') > -1) {
this.$('.snippet_xml').show(); xmlSnippetEl.show();
this.$('.snippet_json').hide(); jsonSnippetEl.hide();
} else { } else {
this.$('.snippet_json').show(); jsonSnippetEl.show();
this.$('.snippet_xml').hide(); xmlSnippetEl.hide();
} }
}, },

File diff suppressed because one or more lines are too long

View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

View File

@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute, .swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute, .swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property { .swagger-section pre .coffeescript .property {
color: #8888ff; color: #88F;
} }
.swagger-section pre .keyword, .swagger-section pre .keyword,
.swagger-section pre .id, .swagger-section pre .id,

View File

@@ -801,17 +801,19 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
showSnippet: function () { showSnippet: function () {
var contentTypeEl = this.$('[name=responseContentType]'); var contentTypeEl = this.$('[name=responseContentType]');
var xmlSnippetEl = this.$('.operation-status .snippet_xml, .response-class .snippet_xml');
var jsonSnippetEl = this.$('.operation-status .snippet_json, .response-class .snippet_json');
var contentType; var contentType;
if (!contentTypeEl.length) { return; } if (!contentTypeEl.length) { return; }
contentType = contentTypeEl.val(); contentType = contentTypeEl.val();
if (contentType.indexOf('xml') > -1) { if (contentType.indexOf('xml') > -1) {
this.$('.snippet_xml').show(); xmlSnippetEl.show();
this.$('.snippet_json').hide(); jsonSnippetEl.hide();
} else { } else {
this.$('.snippet_json').show(); jsonSnippetEl.show();
this.$('.snippet_xml').hide(); xmlSnippetEl.hide();
} }
}, },

View File

@@ -1,4 +1,3 @@
<ul class='operations' > <ul class='operations' >
<li class='{{method}} operation' id='{{parentId}}_{{nickname}}'> <li class='{{method}} operation' id='{{parentId}}_{{nickname}}'>
<div class='heading'> <div class='heading'>
@@ -41,12 +40,13 @@
</div> </div>
{{/oauth}} {{/oauth}}
{{#if type}} {{#if type}}
<h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> {{successCode}})</h4> <div class="response-class">
{{#if successDescription}}<div class="markdown">{{{successDescription}}}</div>{{/if}} <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> {{successCode}})</h4>
<p><span class="model-signature" /></p> {{#if successDescription}}<div class="markdown">{{{successDescription}}}</div>{{/if}}
<br/> <p><span class="model-signature" /></p>
<div class="response-content-type" /> <br/>
<div class="response-content-type" />
</div>
{{/if}} {{/if}}
{{#if headers}} {{#if headers}}