JS client: remove "undefined" from model dependency arguments

Closes #2279
This commit is contained in:
xhh 2016-03-07 15:57:13 +08:00
parent b84694380b
commit dfe57bfd6b
22 changed files with 510 additions and 122 deletions

View File

@ -197,6 +197,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
Map<String, Model> modelMap = new HashMap<String, Model>();
modelMap.put(name, model);
Map<String, Object> models = processModels(config, modelMap, definitions);
models.put("classname", config.toModelName(name));
models.putAll(config.additionalProperties());
allProcessedModels.put(name, models);

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'{{#imports}}, './{{import}}'{{/imports}}], factory);
define(['../ApiClient'{{#imports}}, './{{import}}'{{/imports}}], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'){{#imports}}, require('./{{import}}'){{/imports}});
module.exports = factory(require('../ApiClient'){{#imports}}, require('./{{import}}'){{/imports}});
} else {
// Browser globals (root is window)
if (!root.{{moduleName}}) {
root.{{moduleName}} = {};
}
factory(root.{{moduleName}}, root.{{moduleName}}.ApiClient{{#imports}}, root.{{moduleName}}.{{import}}{{/imports}});
root.{{moduleName}}.{{classname}} = factory(root.{{moduleName}}.ApiClient{{#imports}}, root.{{moduleName}}.{{import}}{{/imports}});
}
}(this, function(module, ApiClient{{#imports}}, {{import}}{{/imports}}) {
}(this, function(ApiClient{{#imports}}, {{import}}{{/imports}}) {
'use strict';
{{#models}}{{#model}}
{{#description}}/**
@ -76,10 +76,6 @@
{{#vars}}{{#isEnum}}{{>enumClass}}{{/isEnum}}{{#items.isEnum}}{{#items}}
{{>enumClass}}{{/items}}*/{{/items.isEnum}}{{/vars}}
if (module) {
module.{{classname}} = {{classname}};
}
return {{classname}};
{{/model}}
{{/models}}

View File

@ -306,7 +306,10 @@
case 'Date':
return this.parseDate(String(data));
default:
if (typeof type === 'function') {
if (type === Object) {
// generic object, return directly
return data;
} else if (typeof type === 'function') {
// for model type like: User
var model = type.constructFromObject(data);
return model;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../ApiClient', '../model/Pet'], factory);
define(['../ApiClient', '../model/Pet', '../model/InlineResponse200'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('../model/Pet'));
module.exports = factory(require('../ApiClient'), require('../model/Pet'), require('../model/InlineResponse200'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
root.SwaggerPetstore.PetApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Pet);
root.SwaggerPetstore.PetApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Pet, root.SwaggerPetstore.InlineResponse200);
}
}(this, function(ApiClient, Pet) {
}(this, function(ApiClient, Pet, InlineResponse200) {
'use strict';
var PetApi = function PetApi(apiClient) {
@ -315,6 +315,44 @@
}
/**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param {Integer} petId ID of pet that needs to be fetched
* data is of type: InlineResponse200
*/
self.getPetByIdInObject = function(petId) {
var postBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw "Missing the required parameter 'petId' when calling getPetByIdInObject";
}
var pathParams = {
'petId': petId
};
var queryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = ['petstore_auth', 'api_key'];
var contentTypes = [];
var accepts = ['application/json', 'application/xml'];
var returnType = InlineResponse200;
return this.apiClient.callApi(
'/pet/{petId}?response=inline_arbitrary_object', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions

View File

@ -86,6 +86,37 @@
}
/**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* Returns an arbitrary object which is actually a map of status codes to quantities
* data is of type: Object
*/
self.getInventoryInObject = function() {
var postBody = null;
var pathParams = {
};
var queryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = ['api_key'];
var contentTypes = [];
var accepts = ['application/json', 'application/xml'];
var returnType = Object;
return this.apiClient.callApi(
'/store/inventory?response=arbitrary_object', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Place an order for a pet
*

View File

@ -1,19 +1,22 @@
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['./ApiClient', './model/Order', './model/User', './model/Category', './model/Tag', './model/Pet', './api/UserApi', './api/StoreApi', './api/PetApi'], factory);
define(['./ApiClient', './model/Order', './model/SpecialModelName', './model/User', './model/Category', './model/ObjectReturn', './model/InlineResponse200', './model/Tag', './model/Pet', './api/UserApi', './api/StoreApi', './api/PetApi'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('./ApiClient'), require('./model/Order'), require('./model/User'), require('./model/Category'), require('./model/Tag'), require('./model/Pet'), require('./api/UserApi'), require('./api/StoreApi'), require('./api/PetApi'));
module.exports = factory(require('./ApiClient'), require('./model/Order'), require('./model/SpecialModelName'), require('./model/User'), require('./model/Category'), require('./model/ObjectReturn'), require('./model/InlineResponse200'), require('./model/Tag'), require('./model/Pet'), require('./api/UserApi'), require('./api/StoreApi'), require('./api/PetApi'));
}
}(function(ApiClient, Order, User, Category, Tag, Pet, UserApi, StoreApi, PetApi) {
}(function(ApiClient, Order, SpecialModelName, User, Category, ObjectReturn, InlineResponse200, Tag, Pet, UserApi, StoreApi, PetApi) {
'use strict';
return {
ApiClient: ApiClient,
Order: Order,
SpecialModelName: SpecialModelName,
User: User,
Category: Category,
ObjectReturn: ObjectReturn,
InlineResponse200: InlineResponse200,
Tag: Tag,
Pet: Pet,
UserApi: UserApi,

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.Category = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -71,10 +71,6 @@
if (module) {
module.Category = Category;
}
return Category;

View File

@ -0,0 +1,175 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../ApiClient', './Tag'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Tag'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
root.SwaggerPetstore.InlineResponse200 = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Tag);
}
}(this, function(ApiClient, Tag) {
'use strict';
var InlineResponse200 = function InlineResponse200(id) {
/**
* datatype: Integer
* required
**/
this['id'] = id;
};
InlineResponse200.constructFromObject = function(data) {
if (!data) {
return null;
}
var _this = new InlineResponse200();
if (data['photoUrls']) {
_this['photoUrls'] = ApiClient.convertToType(data['photoUrls'], ['String']);
}
if (data['name']) {
_this['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data['id']) {
_this['id'] = ApiClient.convertToType(data['id'], 'Integer');
}
if (data['category']) {
_this['category'] = ApiClient.convertToType(data['category'], Object);
}
if (data['tags']) {
_this['tags'] = ApiClient.convertToType(data['tags'], [Tag]);
}
if (data['status']) {
_this['status'] = ApiClient.convertToType(data['status'], 'String');
}
return _this;
}
/**
* @return {[String]}
**/
InlineResponse200.prototype.getPhotoUrls = function() {
return this['photoUrls'];
}
/**
* @param {[String]} photoUrls
**/
InlineResponse200.prototype.setPhotoUrls = function(photoUrls) {
this['photoUrls'] = photoUrls;
}
/**
* @return {String}
**/
InlineResponse200.prototype.getName = function() {
return this['name'];
}
/**
* @param {String} name
**/
InlineResponse200.prototype.setName = function(name) {
this['name'] = name;
}
/**
* @return {Integer}
**/
InlineResponse200.prototype.getId = function() {
return this['id'];
}
/**
* @param {Integer} id
**/
InlineResponse200.prototype.setId = function(id) {
this['id'] = id;
}
/**
* @return {Object}
**/
InlineResponse200.prototype.getCategory = function() {
return this['category'];
}
/**
* @param {Object} category
**/
InlineResponse200.prototype.setCategory = function(category) {
this['category'] = category;
}
/**
* @return {[Tag]}
**/
InlineResponse200.prototype.getTags = function() {
return this['tags'];
}
/**
* @param {[Tag]} tags
**/
InlineResponse200.prototype.setTags = function(tags) {
this['tags'] = tags;
}
/**
* get pet status in the store
* @return {StatusEnum}
**/
InlineResponse200.prototype.getStatus = function() {
return this['status'];
}
/**
* set pet status in the store
* @param {StatusEnum} status
**/
InlineResponse200.prototype.setStatus = function(status) {
this['status'] = status;
}
var StatusEnum = {
/**
* @const
*/
AVAILABLE: "available",
/**
* @const
*/
PENDING: "pending",
/**
* @const
*/
SOLD: "sold"
};
InlineResponse200.StatusEnum = StatusEnum;
return InlineResponse200;
}));

View File

@ -0,0 +1,59 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
root.SwaggerPetstore.ObjectReturn = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
var ObjectReturn = function ObjectReturn() {
};
ObjectReturn.constructFromObject = function(data) {
if (!data) {
return null;
}
var _this = new ObjectReturn();
if (data['return']) {
_this['return'] = ApiClient.convertToType(data['return'], 'Integer');
}
return _this;
}
/**
* @return {Integer}
**/
ObjectReturn.prototype.getReturn = function() {
return this['return'];
}
/**
* @param {Integer} _return
**/
ObjectReturn.prototype.setReturn = function(_return) {
this['return'] = _return;
}
return ObjectReturn;
}));

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.Order = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -164,10 +164,6 @@
Order.StatusEnum = StatusEnum;
if (module) {
module.Order = Order;
}
return Order;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient', './Category', './Tag'], factory);
define(['../ApiClient', './Category', './Tag'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'), require('./Category'), require('./Tag'));
module.exports = factory(require('../ApiClient'), require('./Category'), require('./Tag'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Category, root.SwaggerPetstore.Tag);
root.SwaggerPetstore.Pet = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Category, root.SwaggerPetstore.Tag);
}
}(this, function(module, ApiClient, Category, Tag) {
}(this, function(ApiClient, Category, Tag) {
'use strict';
@ -174,10 +174,6 @@
Pet.StatusEnum = StatusEnum;
if (module) {
module.Pet = Pet;
}
return Pet;

View File

@ -0,0 +1,59 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
root.SwaggerPetstore.SpecialModelName = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
var SpecialModelName = function SpecialModelName() {
};
SpecialModelName.constructFromObject = function(data) {
if (!data) {
return null;
}
var _this = new SpecialModelName();
if (data['$special[property.name]']) {
_this['$special[property.name]'] = ApiClient.convertToType(data['$special[property.name]'], 'Integer');
}
return _this;
}
/**
* @return {Integer}
**/
SpecialModelName.prototype.getSpecialPropertyName = function() {
return this['$special[property.name]'];
}
/**
* @param {Integer} specialPropertyName
**/
SpecialModelName.prototype.setSpecialPropertyName = function(specialPropertyName) {
this['$special[property.name]'] = specialPropertyName;
}
return SpecialModelName;
}));

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.Tag = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -71,10 +71,6 @@
if (module) {
module.Tag = Tag;
}
return Tag;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.User = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -181,10 +181,6 @@
if (module) {
module.User = User;
}
return User;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.Category = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -71,10 +71,6 @@
if (module) {
module.Category = Category;
}
return Category;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient', './Tag'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'), require('./Tag'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.InlineResponse200 = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Tag);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient, Tag) {
'use strict';
@ -31,6 +31,10 @@
}
var _this = new InlineResponse200();
if (data['photoUrls']) {
_this['photoUrls'] = ApiClient.convertToType(data['photoUrls'], ['String']);
}
if (data['name']) {
_this['name'] = ApiClient.convertToType(data['name'], 'String');
}
@ -43,11 +47,33 @@
_this['category'] = ApiClient.convertToType(data['category'], Object);
}
if (data['tags']) {
_this['tags'] = ApiClient.convertToType(data['tags'], [Tag]);
}
if (data['status']) {
_this['status'] = ApiClient.convertToType(data['status'], 'String');
}
return _this;
}
/**
* @return {[String]}
**/
InlineResponse200.prototype.getPhotoUrls = function() {
return this['photoUrls'];
}
/**
* @param {[String]} photoUrls
**/
InlineResponse200.prototype.setPhotoUrls = function(photoUrls) {
this['photoUrls'] = photoUrls;
}
/**
* @return {String}
**/
@ -90,14 +116,59 @@
this['category'] = category;
}
if (module) {
module.InlineResponse200 = InlineResponse200;
/**
* @return {[Tag]}
**/
InlineResponse200.prototype.getTags = function() {
return this['tags'];
}
/**
* @param {[Tag]} tags
**/
InlineResponse200.prototype.setTags = function(tags) {
this['tags'] = tags;
}
/**
* get pet status in the store
* @return {StatusEnum}
**/
InlineResponse200.prototype.getStatus = function() {
return this['status'];
}
/**
* set pet status in the store
* @param {StatusEnum} status
**/
InlineResponse200.prototype.setStatus = function(status) {
this['status'] = status;
}
var StatusEnum = {
/**
* @const
*/
AVAILABLE: "available",
/**
* @const
*/
PENDING: "pending",
/**
* @const
*/
SOLD: "sold"
};
InlineResponse200.StatusEnum = StatusEnum;
return InlineResponse200;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.ObjectReturn = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -53,10 +53,6 @@
if (module) {
module.ObjectReturn = ObjectReturn;
}
return ObjectReturn;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.Order = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -164,10 +164,6 @@
Order.StatusEnum = StatusEnum;
if (module) {
module.Order = Order;
}
return Order;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient', './Category', './Tag'], factory);
define(['../ApiClient', './Category', './Tag'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'), require('./Category'), require('./Tag'));
module.exports = factory(require('../ApiClient'), require('./Category'), require('./Tag'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Category, root.SwaggerPetstore.Tag);
root.SwaggerPetstore.Pet = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Category, root.SwaggerPetstore.Tag);
}
}(this, function(module, ApiClient, Category, Tag) {
}(this, function(ApiClient, Category, Tag) {
'use strict';
@ -174,10 +174,6 @@
Pet.StatusEnum = StatusEnum;
if (module) {
module.Pet = Pet;
}
return Pet;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.SpecialModelName = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -53,10 +53,6 @@
if (module) {
module.SpecialModelName = SpecialModelName;
}
return SpecialModelName;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.Tag = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -71,10 +71,6 @@
if (module) {
module.Tag = Tag;
}
return Tag;

View File

@ -1,18 +1,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([undefined, '../ApiClient'], factory);
define(['../ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(undefined, require('../ApiClient'));
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
factory(root.SwaggerPetstore, root.SwaggerPetstore.ApiClient);
root.SwaggerPetstore.User = factory(root.SwaggerPetstore.ApiClient);
}
}(this, function(module, ApiClient) {
}(this, function(ApiClient) {
'use strict';
@ -181,10 +181,6 @@
if (module) {
module.User = User;
}
return User;