merged with master
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
node_js:
|
||||
- '0.10'
|
||||
- '0.12'
|
||||
- '4.2'
|
||||
install:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
|
||||
@@ -62,7 +62,7 @@ This will start Swagger UI at `http://localhost:8080`.
|
||||
Once you open the Swagger UI, it will load the [Swagger Petstore](http://petstore.swagger.io/v2/swagger.json) service and show its APIs. You can enter your own server url and click explore to view the API.
|
||||
|
||||
### Customize
|
||||
You may choose to customize Swagger UI for your organization. Here is an overview of whats in its various directories:
|
||||
You may choose to customize Swagger UI for your organization. Here is an overview of what's in its various directories:
|
||||
|
||||
- dist: Contains a distribution which you can deploy on a server or load from your local machine.
|
||||
- dist/lang: The swagger localization
|
||||
|
||||
10
dist/swagger-ui.js
vendored
10
dist/swagger-ui.js
vendored
@@ -250,7 +250,8 @@ Handlebars.registerHelper('sanitize', function(html) {
|
||||
|
||||
Handlebars.registerHelper('renderTextParam', function(param) {
|
||||
var result, type = 'text', idAtt = '';
|
||||
var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple;
|
||||
var paramType = param.type || param.schema.type || '';
|
||||
var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple;
|
||||
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
|
||||
|
||||
var dataVendorExtensions = Object.keys(param).filter(function(property) {
|
||||
@@ -24888,9 +24889,10 @@ SwaggerUi.Views.BasicAuthButton = Backbone.View.extend({
|
||||
'click #apply_basic_auth' : 'applyPassword'
|
||||
},
|
||||
|
||||
applyPassword: function(){
|
||||
var username = $('.input_username').val();
|
||||
var password = $('.input_password').val();
|
||||
applyPassword: function(event){
|
||||
event.preventDefault();
|
||||
var username = $('#input_username').val();
|
||||
var password = $('#input_password').val();
|
||||
var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password);
|
||||
this.router.api.clientAuthorizations.add(this.model.type, basicAuth);
|
||||
this.router.load();
|
||||
|
||||
16
dist/swagger-ui.min.js
vendored
16
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
4
index.js
4
index.js
@@ -1,7 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
var pack = require('./package');
|
||||
var path = require('path');
|
||||
|
||||
module.exports = {
|
||||
version: pack.version,
|
||||
dist: path.resolve(__dirname, 'dist')
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,7 +8,8 @@ Handlebars.registerHelper('sanitize', function(html) {
|
||||
|
||||
Handlebars.registerHelper('renderTextParam', function(param) {
|
||||
var result, type = 'text', idAtt = '';
|
||||
var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple;
|
||||
var paramType = param.type || param.schema.type || '';
|
||||
var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple;
|
||||
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
|
||||
|
||||
var dataVendorExtensions = Object.keys(param).filter(function(property) {
|
||||
|
||||
@@ -20,9 +20,10 @@ SwaggerUi.Views.BasicAuthButton = Backbone.View.extend({
|
||||
'click #apply_basic_auth' : 'applyPassword'
|
||||
},
|
||||
|
||||
applyPassword: function(){
|
||||
var username = $('.input_username').val();
|
||||
var password = $('.input_password').val();
|
||||
applyPassword: function(event){
|
||||
event.preventDefault();
|
||||
var username = $('#input_username').val();
|
||||
var password = $('#input_password').val();
|
||||
var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password);
|
||||
this.router.api.clientAuthorizations.add(this.model.type, basicAuth);
|
||||
this.router.load();
|
||||
|
||||
Reference in New Issue
Block a user