added options styling, swagger-js update, per #420

This commit is contained in:
Tony Tam
2014-03-18 19:41:49 -07:00
parent 8f665f76da
commit a5556d7f01
6 changed files with 91 additions and 4 deletions

25
dist/css/screen.css vendored
View File

@@ -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 {
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.post 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
View File

@@ -1,5 +1,5 @@
// swagger.js
// version 2.0.23
// version 2.0.25
var __bind = function(fn, me){
return function(){
@@ -697,6 +697,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
if(type === 'array') {
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
}
param.type = type;
if(type.toLowerCase() === 'boolean') {
param.allowableValues = {};

View File

@@ -1,5 +1,5 @@
// swagger.js
// version 2.0.23
// version 2.0.25
var __bind = function(fn, me){
return function(){
@@ -697,6 +697,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
if(type === 'array') {
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
}
param.type = type;
if(type.toLowerCase() === 'boolean') {
param.allowableValues = {};

View File

@@ -279,8 +279,8 @@ class OperationView extends Backbone.View
# puts the response data in UI
showStatus: (response) ->
if response.content is undefined
content = response.data
url = response.url
content = response.data
url = response.url
else
content = response.content.data
url = response.request.url

View File

@@ -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 {
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.post div.content,
.swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,

View File

@@ -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 {
&.get, &.post, &.head, &.put, &.patch, &.delete {
div.content {