Upgraded highlight version to 9.1, removed highlight when sample is too long
This commit is contained in:
63
dist/css/print.css
vendored
63
dist/css/print.css
vendored
@@ -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,
|
||||||
@@ -120,6 +120,67 @@
|
|||||||
.swagger-section pre .xml .cdata {
|
.swagger-section pre .xml .cdata {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
.swagger-section .hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: #F0F0F0;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs,
|
||||||
|
.swagger-section .hljs-subst {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-keyword,
|
||||||
|
.swagger-section .hljs-attribute,
|
||||||
|
.swagger-section .hljs-selector-tag,
|
||||||
|
.swagger-section .hljs-meta-keyword,
|
||||||
|
.swagger-section .hljs-doctag,
|
||||||
|
.swagger-section .hljs-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-built_in,
|
||||||
|
.swagger-section .hljs-literal,
|
||||||
|
.swagger-section .hljs-bullet,
|
||||||
|
.swagger-section .hljs-code,
|
||||||
|
.swagger-section .hljs-addition {
|
||||||
|
color: #1F811F;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-regexp,
|
||||||
|
.swagger-section .hljs-symbol,
|
||||||
|
.swagger-section .hljs-variable,
|
||||||
|
.swagger-section .hljs-template-variable,
|
||||||
|
.swagger-section .hljs-link,
|
||||||
|
.swagger-section .hljs-selector-attr,
|
||||||
|
.swagger-section .hljs-selector-pseudo {
|
||||||
|
color: #BC6060;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-type,
|
||||||
|
.swagger-section .hljs-string,
|
||||||
|
.swagger-section .hljs-number,
|
||||||
|
.swagger-section .hljs-selector-id,
|
||||||
|
.swagger-section .hljs-selector-class,
|
||||||
|
.swagger-section .hljs-quote,
|
||||||
|
.swagger-section .hljs-template-tag,
|
||||||
|
.swagger-section .hljs-deletion {
|
||||||
|
color: #880000;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-title,
|
||||||
|
.swagger-section .hljs-section {
|
||||||
|
color: #880000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-comment {
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-meta {
|
||||||
|
color: #2B6EA1;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-emphasis {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap {
|
.swagger-section .swagger-ui-wrap {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-family: "Droid Sans", sans-serif;
|
font-family: "Droid Sans", sans-serif;
|
||||||
|
|||||||
63
dist/css/screen.css
vendored
63
dist/css/screen.css
vendored
@@ -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,
|
||||||
@@ -120,6 +120,67 @@
|
|||||||
.swagger-section pre .xml .cdata {
|
.swagger-section pre .xml .cdata {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
.swagger-section .hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: #F0F0F0;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs,
|
||||||
|
.swagger-section .hljs-subst {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-keyword,
|
||||||
|
.swagger-section .hljs-attribute,
|
||||||
|
.swagger-section .hljs-selector-tag,
|
||||||
|
.swagger-section .hljs-meta-keyword,
|
||||||
|
.swagger-section .hljs-doctag,
|
||||||
|
.swagger-section .hljs-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-built_in,
|
||||||
|
.swagger-section .hljs-literal,
|
||||||
|
.swagger-section .hljs-bullet,
|
||||||
|
.swagger-section .hljs-code,
|
||||||
|
.swagger-section .hljs-addition {
|
||||||
|
color: #1F811F;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-regexp,
|
||||||
|
.swagger-section .hljs-symbol,
|
||||||
|
.swagger-section .hljs-variable,
|
||||||
|
.swagger-section .hljs-template-variable,
|
||||||
|
.swagger-section .hljs-link,
|
||||||
|
.swagger-section .hljs-selector-attr,
|
||||||
|
.swagger-section .hljs-selector-pseudo {
|
||||||
|
color: #BC6060;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-type,
|
||||||
|
.swagger-section .hljs-string,
|
||||||
|
.swagger-section .hljs-number,
|
||||||
|
.swagger-section .hljs-selector-id,
|
||||||
|
.swagger-section .hljs-selector-class,
|
||||||
|
.swagger-section .hljs-quote,
|
||||||
|
.swagger-section .hljs-template-tag,
|
||||||
|
.swagger-section .hljs-deletion {
|
||||||
|
color: #880000;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-title,
|
||||||
|
.swagger-section .hljs-section {
|
||||||
|
color: #880000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-comment {
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-meta {
|
||||||
|
color: #2B6EA1;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-emphasis {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap {
|
.swagger-section .swagger-ui-wrap {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-family: "Droid Sans", sans-serif;
|
font-family: "Droid Sans", sans-serif;
|
||||||
|
|||||||
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -20,7 +20,7 @@
|
|||||||
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
||||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
||||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||||
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
|
||||||
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
||||||
<script src='lib/marked.js' type='text/javascript'></script>
|
<script src='lib/marked.js' type='text/javascript'></script>
|
||||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||||
|
|||||||
1
dist/lib/highlight.7.3.pack.js
vendored
1
dist/lib/highlight.7.3.pack.js
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/highlight.9.1.0.pack.js
vendored
Normal file
2
dist/lib/highlight.9.1.0.pack.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/lib/swagger-oauth.js
vendored
2
dist/lib/swagger-oauth.js
vendored
@@ -212,7 +212,7 @@ function initOAuth(opts) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
||||||
$('.api-ic').unbind();
|
$('.api-ic').unbind();
|
||||||
$('.api-ic').click(function(s) {
|
$('.api-ic').click(function(s) {
|
||||||
if($(s.target).hasClass('ic-off'))
|
if($(s.target).hasClass('ic-off'))
|
||||||
|
|||||||
44
dist/swagger-ui.js
vendored
44
dist/swagger-ui.js
vendored
@@ -241,6 +241,7 @@ window.Docs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
/*jslint eqeq: true*/
|
||||||
|
|
||||||
Handlebars.registerHelper('sanitize', function(html) {
|
Handlebars.registerHelper('sanitize', function(html) {
|
||||||
// Strip the script tags from the html, and return it as a Handlebars.SafeString
|
// Strip the script tags from the html, and return it as a Handlebars.SafeString
|
||||||
@@ -294,6 +295,29 @@ Handlebars.registerHelper('renderTextParam', function(param) {
|
|||||||
return new Handlebars.SafeString(result);
|
return new Handlebars.SafeString(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
|
||||||
|
|
||||||
|
switch (operator) {
|
||||||
|
case '==':
|
||||||
|
return (v1 == v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '===':
|
||||||
|
return (v1 === v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '<':
|
||||||
|
return (v1 < v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '<=':
|
||||||
|
return (v1 <= v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '>':
|
||||||
|
return (v1 > v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '>=':
|
||||||
|
return (v1 >= v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '&&':
|
||||||
|
return (v1 && v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '||':
|
||||||
|
return (v1 || v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
default:
|
||||||
|
return options.inverse(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <div class=\"info_title\">"
|
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <div class=\"info_title\">"
|
||||||
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
|
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
|
||||||
@@ -881,19 +905,27 @@ this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({
|
|||||||
return buffer + "</select>\n";
|
return buffer + "</select>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
this["Handlebars"]["templates"]["signature"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["signature"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = " <div class=\"snippet_json\">\n <pre><code>"
|
var stack1, helper, helperMissing=helpers.helperMissing, functionType="function", escapeExpression=this.escapeExpression, buffer = " <div class=\"snippet_json\">\n <pre><code class=\"";
|
||||||
|
stack1 = ((helpers.ifCond || (depth0 && depth0.ifCond) || helperMissing).call(depth0, ((stack1 = (depth0 != null ? depth0.sampleJSON : depth0)) != null ? stack1.length : stack1), ">", 5000, {"name":"ifCond","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "\">"
|
||||||
+ escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))
|
||||||
+ "</code></pre>\n ";
|
+ "</code></pre>\n ";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isParam : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isParam : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + "\n </div>\n";
|
return buffer + "\n </div>\n";
|
||||||
},"2":function(depth0,helpers,partials,data) {
|
},"2":function(depth0,helpers,partials,data) {
|
||||||
return "<small class=\"notice\" data-sw-translate></small>";
|
return "nohighlight";
|
||||||
},"4":function(depth0,helpers,partials,data) {
|
},"4":function(depth0,helpers,partials,data) {
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = " <div class=\"snippet_xml\">\n <pre><code>"
|
return "<small class=\"notice\" data-sw-translate></small>";
|
||||||
|
},"6":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helper, helperMissing=helpers.helperMissing, functionType="function", escapeExpression=this.escapeExpression, buffer = " <div class=\"snippet_xml\">\n <pre><code class=\"";
|
||||||
|
stack1 = ((helpers.ifCond || (depth0 && depth0.ifCond) || helperMissing).call(depth0, ((stack1 = (depth0 != null ? depth0.sampleXML : depth0)) != null ? stack1.length : stack1), ">", 5000, {"name":"ifCond","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "\">"
|
||||||
+ escapeExpression(((helper = (helper = helpers.sampleXML || (depth0 != null ? depth0.sampleXML : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleXML","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.sampleXML || (depth0 != null ? depth0.sampleXML : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleXML","hash":{},"data":data}) : helper)))
|
||||||
+ "</code></pre>\n ";
|
+ "</code></pre>\n ";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isParam : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isParam : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + "\n </div>\n";
|
return buffer + "\n </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) {
|
||||||
@@ -903,7 +935,7 @@ this["Handlebars"]["templates"]["signature"] = Handlebars.template({"1":function
|
|||||||
buffer += "\n </div>\n\n <div class=\"snippet\">\n";
|
buffer += "\n </div>\n\n <div class=\"snippet\">\n";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.sampleJSON : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.sampleJSON : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.sampleXML : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.sampleXML : depth0), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + " </div>\n</div>\n";
|
return buffer + " </div>\n</div>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
|
|||||||
22
dist/swagger-ui.min.js
vendored
22
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
lib/highlight.9.1.0.pack.js
Normal file
2
lib/highlight.9.1.0.pack.js
Normal file
File diff suppressed because one or more lines are too long
@@ -212,7 +212,7 @@ function initOAuth(opts) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
||||||
$('.api-ic').unbind();
|
$('.api-ic').unbind();
|
||||||
$('.api-ic').click(function(s) {
|
$('.api-ic').click(function(s) {
|
||||||
if($(s.target).hasClass('ic-off'))
|
if($(s.target).hasClass('ic-off'))
|
||||||
|
|||||||
@@ -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,
|
||||||
@@ -120,6 +120,67 @@
|
|||||||
.swagger-section pre .xml .cdata {
|
.swagger-section pre .xml .cdata {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
.swagger-section .hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: #F0F0F0;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs,
|
||||||
|
.swagger-section .hljs-subst {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-keyword,
|
||||||
|
.swagger-section .hljs-attribute,
|
||||||
|
.swagger-section .hljs-selector-tag,
|
||||||
|
.swagger-section .hljs-meta-keyword,
|
||||||
|
.swagger-section .hljs-doctag,
|
||||||
|
.swagger-section .hljs-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-built_in,
|
||||||
|
.swagger-section .hljs-literal,
|
||||||
|
.swagger-section .hljs-bullet,
|
||||||
|
.swagger-section .hljs-code,
|
||||||
|
.swagger-section .hljs-addition {
|
||||||
|
color: #1F811F;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-regexp,
|
||||||
|
.swagger-section .hljs-symbol,
|
||||||
|
.swagger-section .hljs-variable,
|
||||||
|
.swagger-section .hljs-template-variable,
|
||||||
|
.swagger-section .hljs-link,
|
||||||
|
.swagger-section .hljs-selector-attr,
|
||||||
|
.swagger-section .hljs-selector-pseudo {
|
||||||
|
color: #BC6060;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-type,
|
||||||
|
.swagger-section .hljs-string,
|
||||||
|
.swagger-section .hljs-number,
|
||||||
|
.swagger-section .hljs-selector-id,
|
||||||
|
.swagger-section .hljs-selector-class,
|
||||||
|
.swagger-section .hljs-quote,
|
||||||
|
.swagger-section .hljs-template-tag,
|
||||||
|
.swagger-section .hljs-deletion {
|
||||||
|
color: #880000;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-title,
|
||||||
|
.swagger-section .hljs-section {
|
||||||
|
color: #880000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-comment {
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-meta {
|
||||||
|
color: #2B6EA1;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-emphasis {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap {
|
.swagger-section .swagger-ui-wrap {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-family: "Droid Sans", sans-serif;
|
font-family: "Droid Sans", sans-serif;
|
||||||
|
|||||||
@@ -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,
|
||||||
@@ -120,6 +120,67 @@
|
|||||||
.swagger-section pre .xml .cdata {
|
.swagger-section pre .xml .cdata {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
.swagger-section .hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: #F0F0F0;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs,
|
||||||
|
.swagger-section .hljs-subst {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-keyword,
|
||||||
|
.swagger-section .hljs-attribute,
|
||||||
|
.swagger-section .hljs-selector-tag,
|
||||||
|
.swagger-section .hljs-meta-keyword,
|
||||||
|
.swagger-section .hljs-doctag,
|
||||||
|
.swagger-section .hljs-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-built_in,
|
||||||
|
.swagger-section .hljs-literal,
|
||||||
|
.swagger-section .hljs-bullet,
|
||||||
|
.swagger-section .hljs-code,
|
||||||
|
.swagger-section .hljs-addition {
|
||||||
|
color: #1F811F;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-regexp,
|
||||||
|
.swagger-section .hljs-symbol,
|
||||||
|
.swagger-section .hljs-variable,
|
||||||
|
.swagger-section .hljs-template-variable,
|
||||||
|
.swagger-section .hljs-link,
|
||||||
|
.swagger-section .hljs-selector-attr,
|
||||||
|
.swagger-section .hljs-selector-pseudo {
|
||||||
|
color: #BC6060;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-type,
|
||||||
|
.swagger-section .hljs-string,
|
||||||
|
.swagger-section .hljs-number,
|
||||||
|
.swagger-section .hljs-selector-id,
|
||||||
|
.swagger-section .hljs-selector-class,
|
||||||
|
.swagger-section .hljs-quote,
|
||||||
|
.swagger-section .hljs-template-tag,
|
||||||
|
.swagger-section .hljs-deletion {
|
||||||
|
color: #880000;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-title,
|
||||||
|
.swagger-section .hljs-section {
|
||||||
|
color: #880000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-comment {
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-meta {
|
||||||
|
color: #2B6EA1;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-emphasis {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.swagger-section .hljs-strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap {
|
.swagger-section .swagger-ui-wrap {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-family: "Droid Sans", sans-serif;
|
font-family: "Droid Sans", sans-serif;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -20,7 +19,7 @@
|
|||||||
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
||||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
||||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||||
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
|
||||||
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
||||||
<script src='lib/marked.js' type='text/javascript'></script>
|
<script src='lib/marked.js' type='text/javascript'></script>
|
||||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
/*jslint eqeq: true*/
|
||||||
|
|
||||||
Handlebars.registerHelper('sanitize', function(html) {
|
Handlebars.registerHelper('sanitize', function(html) {
|
||||||
// Strip the script tags from the html, and return it as a Handlebars.SafeString
|
// Strip the script tags from the html, and return it as a Handlebars.SafeString
|
||||||
@@ -51,3 +52,27 @@ Handlebars.registerHelper('renderTextParam', function(param) {
|
|||||||
}
|
}
|
||||||
return new Handlebars.SafeString(result);
|
return new Handlebars.SafeString(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
|
||||||
|
|
||||||
|
switch (operator) {
|
||||||
|
case '==':
|
||||||
|
return (v1 == v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '===':
|
||||||
|
return (v1 === v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '<':
|
||||||
|
return (v1 < v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '<=':
|
||||||
|
return (v1 <= v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '>':
|
||||||
|
return (v1 > v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '>=':
|
||||||
|
return (v1 >= v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '&&':
|
||||||
|
return (v1 && v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
case '||':
|
||||||
|
return (v1 || v2) ? options.fn(this) : options.inverse(this);
|
||||||
|
default:
|
||||||
|
return options.inverse(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -132,4 +132,76 @@ pre .xml .cdata {
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: #F0F0F0
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs,
|
||||||
|
.hljs-subst {
|
||||||
|
color: #444
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-keyword,
|
||||||
|
.hljs-attribute,
|
||||||
|
.hljs-selector-tag,
|
||||||
|
.hljs-meta-keyword,
|
||||||
|
.hljs-doctag,
|
||||||
|
.hljs-name {
|
||||||
|
font-weight: bold
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-built_in,
|
||||||
|
.hljs-literal,
|
||||||
|
.hljs-bullet,
|
||||||
|
.hljs-code,
|
||||||
|
.hljs-addition {
|
||||||
|
color: #1F811F
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-regexp,
|
||||||
|
.hljs-symbol,
|
||||||
|
.hljs-variable,
|
||||||
|
.hljs-template-variable,
|
||||||
|
.hljs-link,
|
||||||
|
.hljs-selector-attr,
|
||||||
|
.hljs-selector-pseudo {
|
||||||
|
color: #BC6060
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-type,
|
||||||
|
.hljs-string,
|
||||||
|
.hljs-number,
|
||||||
|
.hljs-selector-id,
|
||||||
|
.hljs-selector-class,
|
||||||
|
.hljs-quote,
|
||||||
|
.hljs-template-tag,
|
||||||
|
.hljs-deletion {
|
||||||
|
color: #880000
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-title,
|
||||||
|
.hljs-section {
|
||||||
|
color: #880000;
|
||||||
|
font-weight: bold
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-comment {
|
||||||
|
color: #888888
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-meta {
|
||||||
|
color: #2B6EA1
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-emphasis {
|
||||||
|
font-style: italic
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-strong {
|
||||||
|
font-weight: bold
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
<div class="snippet">
|
<div class="snippet">
|
||||||
{{#if sampleJSON}}
|
{{#if sampleJSON}}
|
||||||
<div class="snippet_json">
|
<div class="snippet_json">
|
||||||
<pre><code>{{sampleJSON}}</code></pre>
|
<pre><code class="{{#ifCond sampleJSON.length ">" 5000}}nohighlight{{/ifCond}}">{{sampleJSON}}</code></pre>
|
||||||
{{#if isParam}}<small class="notice" data-sw-translate></small>{{/if}}
|
{{#if isParam}}<small class="notice" data-sw-translate></small>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if sampleXML}}
|
{{#if sampleXML}}
|
||||||
<div class="snippet_xml">
|
<div class="snippet_xml">
|
||||||
<pre><code>{{sampleXML}}</code></pre>
|
<pre><code class="{{#ifCond sampleXML.length ">" 5000}}nohighlight{{/ifCond}}">{{sampleXML}}</code></pre>
|
||||||
{{#if isParam}}<small class="notice" data-sw-translate></small>{{/if}}
|
{{#if isParam}}<small class="notice" data-sw-translate></small>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
Reference in New Issue
Block a user