diff --git a/dist/lib/swagger-client.js b/dist/lib/swagger-client.js index 03fccb83..2b5b850b 100644 --- a/dist/lib/swagger-client.js +++ b/dist/lib/swagger-client.js @@ -6,28 +6,28 @@ */ (function(){ var ArrayModel = function(definition) { - this.name = "name"; + this.name = "arrayModel"; this.definition = definition || {}; this.properties = []; var requiredFields = definition.enum || []; - var items = definition.items; - if(items) { - var type = items.type; - if(items.type) { - this.type = typeFromJsonSchema(type.type, type.format); + var innerType = definition.items; + if(innerType) { + if(innerType.type) { + this.type = typeFromJsonSchema(innerType.type, innerType.format); } else { - this.ref = items.$ref; + this.ref = innerType.$ref; } } + return this; }; ArrayModel.prototype.createJSONSample = function(modelsToIgnore) { var result; modelsToIgnore = (modelsToIgnore||{}); if(this.type) { - result = type; + result = this.type; } else if (this.ref) { var name = simpleRef(this.ref); @@ -2058,7 +2058,7 @@ Operation.prototype.urlify = function (args) { var param = this.parameters[i]; if(typeof args[param.name] !== 'undefined') { if(param.in === 'path') { - var reg = new RegExp('\{' + param.name + '[^\}]*\}', 'gi'); + var reg = new RegExp('\{' + param.name + '\}', 'gi'); var value = args[param.name]; if(Array.isArray(value)) value = this.encodePathCollection(param.collectionFormat, param.name, value); @@ -2969,21 +2969,6 @@ e.PasswordAuthorization = PasswordAuthorization; e.CookieAuthorization = CookieAuthorization; e.SwaggerClient = SwaggerClient; e.Operation = Operation; - -// 1.x compat -// e.SampleModels = sampleModels; -// e.SwaggerHttp = SwaggerHttp; -// e.SwaggerRequest = SwaggerRequest; -// e.SwaggerAuthorizations = SwaggerAuthorizations; -// e.authorizations = new SwaggerAuthorizations(); -// e.ApiKeyAuthorization = ApiKeyAuthorization; -// e.PasswordAuthorization = PasswordAuthorization; -// e.CookieAuthorization = CookieAuthorization; -// e.JQueryHttpClient = JQueryHttpClient; -// e.ShredHttpClient = ShredHttpClient; -// e.SwaggerOperation = SwaggerOperation; -// e.SwaggerModel = SwaggerModel; -// e.SwaggerModelProperty = SwaggerModelProperty; -// e.SwaggerResource = SwaggerResource; +e.Model = Model; e.SwaggerApi = SwaggerApi; })(); \ No newline at end of file diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index dfef3d60..34f3b391 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -193,6 +193,14 @@ var Docs = { } }; +this["Handlebars"] = this["Handlebars"] || {}; +this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {}; +this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return "\n