added options styling, swagger-js update, per #420
This commit is contained in:
25
dist/css/screen.css
vendored
25
dist/css/screen.css
vendored
@@ -919,6 +919,31 @@ table {
|
|||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
|
||||||
color: #6fa5d2;
|
color: #6fa5d2;
|
||||||
}
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
|
||||||
|
background-color: #e7f0f7;
|
||||||
|
border: 1px solid #c3d9ec;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
|
||||||
|
background-color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
|
||||||
|
border-right: 1px solid #dddddd;
|
||||||
|
border-right-color: #c3d9ec;
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
|
||||||
|
background-color: #DFDF29;
|
||||||
|
border: 1px solid #c3d9ec;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
|
||||||
|
color: #6fa5d2;
|
||||||
|
}
|
||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
|
||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
|
||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
|
||||||
|
|||||||
3
dist/lib/swagger.js
vendored
3
dist/lib/swagger.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
// swagger.js
|
// swagger.js
|
||||||
// version 2.0.23
|
// version 2.0.25
|
||||||
|
|
||||||
var __bind = function(fn, me){
|
var __bind = function(fn, me){
|
||||||
return function(){
|
return function(){
|
||||||
@@ -697,6 +697,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
|
|||||||
if(type === 'array') {
|
if(type === 'array') {
|
||||||
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
|
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
|
||||||
}
|
}
|
||||||
|
param.type = type;
|
||||||
|
|
||||||
if(type.toLowerCase() === 'boolean') {
|
if(type.toLowerCase() === 'boolean') {
|
||||||
param.allowableValues = {};
|
param.allowableValues = {};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// swagger.js
|
// swagger.js
|
||||||
// version 2.0.23
|
// version 2.0.25
|
||||||
|
|
||||||
var __bind = function(fn, me){
|
var __bind = function(fn, me){
|
||||||
return function(){
|
return function(){
|
||||||
@@ -697,6 +697,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
|
|||||||
if(type === 'array') {
|
if(type === 'array') {
|
||||||
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
|
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
|
||||||
}
|
}
|
||||||
|
param.type = type;
|
||||||
|
|
||||||
if(type.toLowerCase() === 'boolean') {
|
if(type.toLowerCase() === 'boolean') {
|
||||||
param.allowableValues = {};
|
param.allowableValues = {};
|
||||||
|
|||||||
@@ -279,8 +279,8 @@ class OperationView extends Backbone.View
|
|||||||
# puts the response data in UI
|
# puts the response data in UI
|
||||||
showStatus: (response) ->
|
showStatus: (response) ->
|
||||||
if response.content is undefined
|
if response.content is undefined
|
||||||
content = response.data
|
content = response.data
|
||||||
url = response.url
|
url = response.url
|
||||||
else
|
else
|
||||||
content = response.content.data
|
content = response.content.data
|
||||||
url = response.request.url
|
url = response.request.url
|
||||||
|
|||||||
@@ -919,6 +919,31 @@ table {
|
|||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
|
||||||
color: #6fa5d2;
|
color: #6fa5d2;
|
||||||
}
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
|
||||||
|
background-color: #e7f0f7;
|
||||||
|
border: 1px solid #c3d9ec;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
|
||||||
|
background-color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
|
||||||
|
border-right: 1px solid #dddddd;
|
||||||
|
border-right-color: #c3d9ec;
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
|
||||||
|
background-color: #DFDF29;
|
||||||
|
border: 1px solid #c3d9ec;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
|
||||||
|
color: #6fa5d2;
|
||||||
|
}
|
||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
|
||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
|
||||||
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
|
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
|
||||||
|
|||||||
@@ -914,6 +914,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
li.operation.options {
|
||||||
|
div.heading {
|
||||||
|
background-color: #e7f0f7;
|
||||||
|
border: 1px solid #c3d9ec;
|
||||||
|
h3 {
|
||||||
|
span.http_method {
|
||||||
|
a {
|
||||||
|
background-color: #0f6ab4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ul.options {
|
||||||
|
li {
|
||||||
|
border-right: 1px solid #dddddd;
|
||||||
|
border-right-color: #c3d9ec;
|
||||||
|
color: #0f6ab4;
|
||||||
|
a {
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
div.content {
|
||||||
|
background-color: #ebf3f9;
|
||||||
|
border: 1px solid #c3d9ec;
|
||||||
|
h4 {
|
||||||
|
color: #0f6ab4;
|
||||||
|
}
|
||||||
|
div.sandbox_header {
|
||||||
|
a {
|
||||||
|
color: #6fa5d2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
li.operation {
|
li.operation {
|
||||||
&.get, &.post, &.head, &.put, &.patch, &.delete {
|
&.get, &.post, &.head, &.put, &.patch, &.delete {
|
||||||
div.content {
|
div.content {
|
||||||
|
|||||||
Reference in New Issue
Block a user