Skip to content

Commit

Permalink
Merge pull request swagger-api#2 from swagger-api/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
xamelion committed May 16, 2015
2 parents 52b307e + bf221ff commit c1fb4a3
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swagger-ui",
"main": "dist/index.html",
"version": "2.1.8-M1",
"version": "2.1.5-M2",
"authors": [
"Mohsen Azimi <[email protected]>"
],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}
3 changes: 3 additions & 0 deletions src/main/html/css/print.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/html/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
log("Unable to Load SwaggerUI");
},
docExpansion: "none",
sorter : "alpha"
apisSorter: "alpha"
});

function addApiKeyAuthorization(){
Expand Down
4 changes: 3 additions & 1 deletion src/main/javascript/SwaggerUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 5 additions & 1 deletion src/main/javascript/helpers/handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '</textarea>';
} else {
result = '<input class=\'parameter\'' + (param.required ? ' class=\'required\'' : '') + ' minlength=\'' + (param.required ? 1 : 0) + '\'';
var parameterClass = 'parameter';
if(param.required) {
parameterClass += ' required';
}
result = '<input class=\'' + parameterClass + '\' minlength=\'' + (param.required ? 1 : 0) + '\'';
result += ' name=\'' + param.name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'';
result += ' type=\'' + type + '\' value=\'' + defaultValue + '\'/>';
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/javascript/view/MainView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/less/specs.less
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,10 @@
}
}
}

.operation-status td.markdown > p:last-child {
padding-bottom: 0;
}
}

}
2 changes: 1 addition & 1 deletion src/main/template/param_list.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
{{/each}}
</select>
</td>
<td class="markdown">{{{description}}}</td>
<td class="markdown">{{#if required}}<strong>{{/if}}{{{description}}}{{#if required}}</strong>{{/if}}</td>
<td>{{{paramType}}}</td>
<td><span class="model-signature"></span></td>
2 changes: 1 addition & 1 deletion src/main/template/status_code.handlebars
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<td width='15%' class='code'>{{code}}</td>
<td>{{{message}}}</td>
<td class="markdown">{{{message}}}</td>
<td width='50%'><span class="model-signature" /></td>
<td class="headers">
<table>
Expand Down

0 comments on commit c1fb4a3

Please sign in to comment.