diff --git a/bower.json b/bower.json index 4808bbafd6c..e0c9fce4fbf 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "swagger-ui", "main": "dist/index.html", - "version": "2.1.8-M1", + "version": "2.1.5-M2", "authors": [ "Mohsen Azimi " ], diff --git a/package.json b/package.json index 4bd2a204758..75a58431e3a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ } ], "description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API", - "version": "2.1.2-M2", + "version": "2.1.5-M2", "homepage": "http://swagger.io", "license": "Apache 2.0", "main": "dist/swagger-ui.js", @@ -50,6 +50,6 @@ "less": "^2.4.0", "mocha": "^2.1.0", "selenium-webdriver": "^2.45.0", - "swagger-client": "2.1.4-M2" + "swagger-client": "2.1.6-M2" } } diff --git a/src/main/html/css/print.css b/src/main/html/css/print.css index a48f0585ab0..706b1ac4092 100644 --- a/src/main/html/css/print.css +++ b/src/main/html/css/print.css @@ -1069,6 +1069,9 @@ .swagger-section .swagger-ui-wrap form.form_box p strong { color: black; } +.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child { + padding-bottom: 0; +} .swagger-section .title { font-style: bold; } diff --git a/src/main/html/css/screen.css b/src/main/html/css/screen.css index ca381b9e7b6..9c312796c10 100644 --- a/src/main/html/css/screen.css +++ b/src/main/html/css/screen.css @@ -1069,6 +1069,9 @@ .swagger-section .swagger-ui-wrap form.form_box p strong { color: black; } +.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child { + padding-bottom: 0; +} .swagger-section .title { font-style: bold; } diff --git a/src/main/html/index.html b/src/main/html/index.html index 5194dbc2deb..9429a58911e 100644 --- a/src/main/html/index.html +++ b/src/main/html/index.html @@ -52,7 +52,7 @@ log("Unable to Load SwaggerUI"); }, docExpansion: "none", - sorter : "alpha" + apisSorter: "alpha" }); function addApiKeyAuthorization(){ diff --git a/src/main/javascript/SwaggerUi.js b/src/main/javascript/SwaggerUi.js index 7c3be6ca7fb..0b73f102a4c 100644 --- a/src/main/javascript/SwaggerUi.js +++ b/src/main/javascript/SwaggerUi.js @@ -90,7 +90,9 @@ window.SwaggerUi = Backbone.Router.extend({ if (url && url.indexOf('http') !== 0) { url = this.buildUrl(window.location.href.toString(), url); } - + if(this.api) { + this.options.authorizations = this.api.clientAuthorizations; + } this.options.url = url; this.headerView.update(url); diff --git a/src/main/javascript/helpers/handlebars.js b/src/main/javascript/helpers/handlebars.js index 334647ee39f..226acc30bef 100644 --- a/src/main/javascript/helpers/handlebars.js +++ b/src/main/javascript/helpers/handlebars.js @@ -24,7 +24,11 @@ Handlebars.registerHelper('renderTextParam', function(param) { result += ' placeholder=\'Provide multiple values in new lines' + (param.required ? ' (at least one required).' : '.') + '\'>'; result += defaultValue + ''; } else { - result = ''; } diff --git a/src/main/javascript/view/MainView.js b/src/main/javascript/view/MainView.js index 0a19f4ff196..626df464fea 100644 --- a/src/main/javascript/view/MainView.js +++ b/src/main/javascript/view/MainView.js @@ -68,7 +68,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ } else { // Default validator - if(window.location.protocol.startsWith('http')) { + if(window.location.protocol.indexOf('http') === 0) { this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator'; } } diff --git a/src/main/less/specs.less b/src/main/less/specs.less index 070de3ab8ba..850ca794796 100644 --- a/src/main/less/specs.less +++ b/src/main/less/specs.less @@ -1085,6 +1085,10 @@ } } } + + .operation-status td.markdown > p:last-child { + padding-bottom: 0; + } } } \ No newline at end of file diff --git a/src/main/template/param_list.handlebars b/src/main/template/param_list.handlebars index b9f9dd75cbe..6957122fde3 100644 --- a/src/main/template/param_list.handlebars +++ b/src/main/template/param_list.handlebars @@ -24,6 +24,6 @@ {{/each}} -{{{description}}} +{{#if required}}{{/if}}{{{description}}}{{#if required}}{{/if}} {{{paramType}}} diff --git a/src/main/template/status_code.handlebars b/src/main/template/status_code.handlebars index a0a6122e4f8..d6f288cae29 100644 --- a/src/main/template/status_code.handlebars +++ b/src/main/template/status_code.handlebars @@ -1,5 +1,5 @@ {{code}} -{{{message}}} +{{{message}}}