Skip to content

Commit

Permalink
Updating swagger-ui code to the latest version and removing the 'Try …
Browse files Browse the repository at this point in the history
…it out' buttons
  • Loading branch information
nikhiljindal committed Feb 4, 2015
1 parent 0474c49 commit 6684d96
Show file tree
Hide file tree
Showing 12 changed files with 27,004 additions and 9,875 deletions.
30,048 changes: 23,092 additions & 6,956 deletions pkg/ui/datafile.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions third_party/swagger-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ https://github.com/swagger-api/swagger-ui#how-to-use-it
- Updated the url to "../../swaggerapi" as per instructions at:
https://github.com/swagger-api/swagger-ui#how-to-use-it
- Modified swagger-ui.js to list resources and operations in sorted order.
- Set supportedSubmitMethods: [] in index.html to remove "Try it out" buttons.

LICENSE file has been created for compliance purposes.
Not included in original distribution.
34 changes: 33 additions & 1 deletion third_party/swagger-ui/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,13 @@
.swagger-section .swagger-ui-wrap .message-fail {
color: #cc0000;
}
.swagger-section .swagger-ui-wrap .info_contact {
.swagger-section .swagger-ui-wrap .info_url {
padding-bottom: 5px;
}
.swagger-section .swagger-ui-wrap .info_email {
padding-bottom: 5px;
}
.swagger-section .swagger-ui-wrap .info_name {
padding-bottom: 5px;
}
.swagger-section .swagger-ui-wrap .info_description {
Expand Down Expand Up @@ -391,6 +397,32 @@
font-weight: bold;
color: #000;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
border-spacing: 0;
position: absolute;
background-color: #ffffff;
border: 1px solid #bbbbbb;
display: none;
font-size: 11px;
max-width: 400px;
line-height: 30px;
color: black;
padding: 5px;
margin-left: 10px;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
text-align: center;
background-color: #eeeeee;
border: 1px solid #bbbbbb;
font-size: 11px;
color: #666666;
font-weight: bold;
padding: 5px;
line-height: 15px;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
font-weight: bold;
}
.swagger-section .swagger-ui-wrap .model-signature .propName {
font-weight: bold;
}
Expand Down
13 changes: 6 additions & 7 deletions third_party/swagger-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>Swagger UI</title>
<link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
Expand All @@ -12,30 +12,29 @@
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='lib/handlebars-1.0.0.js' type='text/javascript'></script>
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
<script src='lib/underscore-min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='lib/swagger.js' type='text/javascript'></script>
<script src='lib/swagger-client.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/marked.js' type='text/javascript'></script>

<!-- enabling this will enable oauth2 implicit scope support -->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<script type="text/javascript">
$(function () {
var url = window.location.search.match(/url=([^&]+)/);
if (url && url.length > 1) {
url = url[1];
url = decodeURIComponent(url[1]);
} else {
url = "../../swaggerapi/";
url = "../../swaggerapi";
}
window.swaggerUi = new SwaggerUi({
url: url,
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
supportedSubmitMethods: [],
onComplete: function(swaggerApi, swaggerUi){
log("Loaded SwaggerUI");
if(typeof initOAuth == "function") {
/*
initOAuth({
Expand Down
51 changes: 14 additions & 37 deletions third_party/swagger-ui/lib/backbone-min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions third_party/swagger-ui/lib/shred.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1723,15 +1723,15 @@ var zlib = null;
try {
zlib = require('zlib');
} catch (e) {
console.warn("no zlib library");
// console.warn("no zlib library");
}

// Iconv doesn't work in browser
var Iconv = null;
try {
Iconv = require('iconv-lite');
} catch (e) {
console.warn("no iconv library");
// console.warn("no iconv library");
}

// Construct a `Response` object. You should never have to do this directly. The
Expand Down Expand Up @@ -2207,7 +2207,7 @@ module.exports = {
constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); };
constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); };
constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); };
},
}
};

});
Expand Down
Loading

0 comments on commit 6684d96

Please sign in to comment.