fixed #340 with empty body, updated swagger-js

This commit is contained in:
Tony Tam
2014-07-10 22:36:41 -07:00
parent f0a099728c
commit 011f70935d
6 changed files with 190 additions and 125 deletions

8
dist/index.html vendored
View File

@@ -2,7 +2,7 @@
<html>
<head>
<title>Swagger UI</title>
<link href='https://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
<link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700' 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'/>
@@ -25,7 +25,7 @@
<script type="text/javascript">
$(function () {
window.swaggerUi = new SwaggerUi({
url: "http://localhost:8002/api/api-docs",
url: "http://petstore.swagger.wordnik.com/api/api-docs",
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
onComplete: function(swaggerApi, swaggerUi){
@@ -55,11 +55,9 @@
log("key: " + key);
if(key && key.trim() != "") {
log("added key " + key);
window.authorizations.add("key", new ApiKeyAuthorization("api_key", key, "header"));
window.authorizations.add("key", new ApiKeyAuthorization("api_key", key, "query"));
}
})
window.authorizations.add("key1", new ApiKeyAuthorization("key1", "the_key_1", "header"));
window.authorizations.add("key2", new ApiKeyAuthorization("key2", "the_key_2", "header"));
window.swaggerUi.load();
});
</script>