forked from loafle/openapi-generator-original
Set embedded templates directory when generating Javascript code (#4585)
This commit is contained in:
@@ -84,7 +84,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
modelTestTemplateFiles.put("model_test.mustache", ".js");
|
||||
apiTemplateFiles.put("api.mustache", ".js");
|
||||
apiTestTemplateFiles.put("api_test.mustache", ".js");
|
||||
templateDir = "Javascript";
|
||||
embeddedTemplateDir = templateDir = "Javascript";
|
||||
apiPackage = "api";
|
||||
modelPackage = "model";
|
||||
modelDocTemplateFiles.put("model_doc.mustache", ".md");
|
||||
|
||||
@@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
||||
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -105,8 +105,10 @@ Class | Method | HTTP request | Description
|
||||
- [SwaggerPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [SwaggerPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [SwaggerPetstore.ArrayTest](docs/ArrayTest.md)
|
||||
- [SwaggerPetstore.Capitalization](docs/Capitalization.md)
|
||||
- [SwaggerPetstore.Cat](docs/Cat.md)
|
||||
- [SwaggerPetstore.Category](docs/Category.md)
|
||||
- [SwaggerPetstore.ClassModel](docs/ClassModel.md)
|
||||
- [SwaggerPetstore.Client](docs/Client.md)
|
||||
- [SwaggerPetstore.Dog](docs/Dog.md)
|
||||
- [SwaggerPetstore.EnumArrays](docs/EnumArrays.md)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# SwaggerPetstore.Capitalization
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**smallCamel** | **String** | | [optional]
|
||||
**capitalCamel** | **String** | | [optional]
|
||||
**smallSnake** | **String** | | [optional]
|
||||
**capitalSnake** | **String** | | [optional]
|
||||
**sCAETHFlowPoints** | **String** | | [optional]
|
||||
**ATT_NAME** | **String** | Name of the pet | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# SwaggerPetstore.ClassModel
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger_petstore');
|
||||
@@ -136,6 +138,8 @@ null (empty response body)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger_petstore');
|
||||
@@ -149,7 +153,7 @@ var opts = {
|
||||
'enumHeaderString': "-efg", // String | Header parameter enum test (string)
|
||||
'enumQueryStringArray': ["enumQueryStringArray_example"], // [String] | Query parameter enum test (string array)
|
||||
'enumQueryString': "-efg", // String | Query parameter enum test (string)
|
||||
'enumQueryInteger': 3.4, // Number | Query parameter enum test (double)
|
||||
'enumQueryInteger': 56, // Number | Query parameter enum test (double)
|
||||
'enumQueryDouble': 1.2 // Number | Query parameter enum test (double)
|
||||
};
|
||||
apiInstance.testEnumParameters(opts).then(function() {
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} body client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
@@ -164,6 +165,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array)
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Cat', 'model/Category', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/FakeApi', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/FakeApi', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Cat'), require('./model/Category'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/FakeApi'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/FakeApi'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
}
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Cat, Category, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, FakeApi, PetApi, StoreApi, UserApi) {
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, FakeApi, PetApi, StoreApi, UserApi) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@@ -94,6 +94,11 @@
|
||||
* @property {module:model/ArrayTest}
|
||||
*/
|
||||
ArrayTest: ArrayTest,
|
||||
/**
|
||||
* The Capitalization model constructor.
|
||||
* @property {module:model/Capitalization}
|
||||
*/
|
||||
Capitalization: Capitalization,
|
||||
/**
|
||||
* The Cat model constructor.
|
||||
* @property {module:model/Cat}
|
||||
@@ -104,6 +109,11 @@
|
||||
* @property {module:model/Category}
|
||||
*/
|
||||
Category: Category,
|
||||
/**
|
||||
* The ClassModel model constructor.
|
||||
* @property {module:model/ClassModel}
|
||||
*/
|
||||
ClassModel: ClassModel,
|
||||
/**
|
||||
* The Client model constructor.
|
||||
* @property {module:model/Client}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(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.Capitalization = factory(root.SwaggerPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The Capitalization model module.
|
||||
* @module model/Capitalization
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Capitalization</code>.
|
||||
* @alias module:model/Capitalization
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>Capitalization</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Capitalization} obj Optional instance to populate.
|
||||
* @return {module:model/Capitalization} The populated <code>Capitalization</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('smallCamel')) {
|
||||
obj['smallCamel'] = ApiClient.convertToType(data['smallCamel'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('CapitalCamel')) {
|
||||
obj['CapitalCamel'] = ApiClient.convertToType(data['CapitalCamel'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('small_Snake')) {
|
||||
obj['small_Snake'] = ApiClient.convertToType(data['small_Snake'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('Capital_Snake')) {
|
||||
obj['Capital_Snake'] = ApiClient.convertToType(data['Capital_Snake'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('SCA_ETH_Flow_Points')) {
|
||||
obj['SCA_ETH_Flow_Points'] = ApiClient.convertToType(data['SCA_ETH_Flow_Points'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('ATT_NAME')) {
|
||||
obj['ATT_NAME'] = ApiClient.convertToType(data['ATT_NAME'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} smallCamel
|
||||
*/
|
||||
exports.prototype['smallCamel'] = undefined;
|
||||
/**
|
||||
* @member {String} CapitalCamel
|
||||
*/
|
||||
exports.prototype['CapitalCamel'] = undefined;
|
||||
/**
|
||||
* @member {String} small_Snake
|
||||
*/
|
||||
exports.prototype['small_Snake'] = undefined;
|
||||
/**
|
||||
* @member {String} Capital_Snake
|
||||
*/
|
||||
exports.prototype['Capital_Snake'] = undefined;
|
||||
/**
|
||||
* @member {String} SCA_ETH_Flow_Points
|
||||
*/
|
||||
exports.prototype['SCA_ETH_Flow_Points'] = undefined;
|
||||
/**
|
||||
* Name of the pet
|
||||
* @member {String} ATT_NAME
|
||||
*/
|
||||
exports.prototype['ATT_NAME'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(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.ClassModel = factory(root.SwaggerPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The ClassModel model module.
|
||||
* @module model/ClassModel
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ClassModel</code>.
|
||||
* Model for testing model with \"_class\" property
|
||||
* @alias module:model/ClassModel
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassModel</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/ClassModel} obj Optional instance to populate.
|
||||
* @return {module:model/ClassModel} The populated <code>ClassModel</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('_class')) {
|
||||
obj['_class'] = ApiClient.convertToType(data['_class'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} _class
|
||||
*/
|
||||
exports.prototype['_class'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.SwaggerPetstore);
|
||||
}
|
||||
}(this, function(expect, SwaggerPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new SwaggerPetstore.Capitalization();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('Capitalization', function() {
|
||||
it('should create an instance of Capitalization', function() {
|
||||
// uncomment below and update the code to test Capitalization
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be.a(SwaggerPetstore.Capitalization);
|
||||
});
|
||||
|
||||
it('should have the property smallCamel (base name: "smallCamel")', function() {
|
||||
// uncomment below and update the code to test the property smallCamel
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property capitalCamel (base name: "CapitalCamel")', function() {
|
||||
// uncomment below and update the code to test the property capitalCamel
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property smallSnake (base name: "small_Snake")', function() {
|
||||
// uncomment below and update the code to test the property smallSnake
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property capitalSnake (base name: "Capital_Snake")', function() {
|
||||
// uncomment below and update the code to test the property capitalSnake
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property sCAETHFlowPoints (base name: "SCA_ETH_Flow_Points")', function() {
|
||||
// uncomment below and update the code to test the property sCAETHFlowPoints
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property ATT_NAME (base name: "ATT_NAME")', function() {
|
||||
// uncomment below and update the code to test the property ATT_NAME
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.SwaggerPetstore);
|
||||
}
|
||||
}(this, function(expect, SwaggerPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new SwaggerPetstore.ClassModel();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('ClassModel', function() {
|
||||
it('should create an instance of ClassModel', function() {
|
||||
// uncomment below and update the code to test ClassModel
|
||||
//var instane = new SwaggerPetstore.ClassModel();
|
||||
//expect(instance).to.be.a(SwaggerPetstore.ClassModel);
|
||||
});
|
||||
|
||||
it('should have the property _class (base name: "_class")', function() {
|
||||
// uncomment below and update the code to test the property _class
|
||||
//var instane = new SwaggerPetstore.ClassModel();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
||||
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -108,8 +108,10 @@ Class | Method | HTTP request | Description
|
||||
- [SwaggerPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [SwaggerPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [SwaggerPetstore.ArrayTest](docs/ArrayTest.md)
|
||||
- [SwaggerPetstore.Capitalization](docs/Capitalization.md)
|
||||
- [SwaggerPetstore.Cat](docs/Cat.md)
|
||||
- [SwaggerPetstore.Category](docs/Category.md)
|
||||
- [SwaggerPetstore.ClassModel](docs/ClassModel.md)
|
||||
- [SwaggerPetstore.Client](docs/Client.md)
|
||||
- [SwaggerPetstore.Dog](docs/Dog.md)
|
||||
- [SwaggerPetstore.EnumArrays](docs/EnumArrays.md)
|
||||
|
||||
13
samples/client/petstore/javascript/docs/Capitalization.md
Normal file
13
samples/client/petstore/javascript/docs/Capitalization.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# SwaggerPetstore.Capitalization
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**smallCamel** | **String** | | [optional]
|
||||
**capitalCamel** | **String** | | [optional]
|
||||
**smallSnake** | **String** | | [optional]
|
||||
**capitalSnake** | **String** | | [optional]
|
||||
**sCAETHFlowPoints** | **String** | | [optional]
|
||||
**ATT_NAME** | **String** | Name of the pet | [optional]
|
||||
|
||||
|
||||
8
samples/client/petstore/javascript/docs/ClassModel.md
Normal file
8
samples/client/petstore/javascript/docs/ClassModel.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# SwaggerPetstore.ClassModel
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_class** | **String** | | [optional]
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger_petstore');
|
||||
@@ -142,6 +144,8 @@ null (empty response body)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger_petstore');
|
||||
@@ -155,7 +159,7 @@ var opts = {
|
||||
'enumHeaderString': "-efg", // String | Header parameter enum test (string)
|
||||
'enumQueryStringArray': ["enumQueryStringArray_example"], // [String] | Query parameter enum test (string array)
|
||||
'enumQueryString': "-efg", // String | Query parameter enum test (string)
|
||||
'enumQueryInteger': 3.4, // Number | Query parameter enum test (double)
|
||||
'enumQueryInteger': 56, // Number | Query parameter enum test (double)
|
||||
'enumQueryDouble': 1.2 // Number | Query parameter enum test (double)
|
||||
};
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} body client model
|
||||
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
@@ -186,6 +187,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array)
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Cat', 'model/Category', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/FakeApi', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/FakeApi', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Cat'), require('./model/Category'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/FakeApi'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/FakeApi'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
}
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Cat, Category, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, FakeApi, PetApi, StoreApi, UserApi) {
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, FakeApi, PetApi, StoreApi, UserApi) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@@ -94,6 +94,11 @@
|
||||
* @property {module:model/ArrayTest}
|
||||
*/
|
||||
ArrayTest: ArrayTest,
|
||||
/**
|
||||
* The Capitalization model constructor.
|
||||
* @property {module:model/Capitalization}
|
||||
*/
|
||||
Capitalization: Capitalization,
|
||||
/**
|
||||
* The Cat model constructor.
|
||||
* @property {module:model/Cat}
|
||||
@@ -104,6 +109,11 @@
|
||||
* @property {module:model/Category}
|
||||
*/
|
||||
Category: Category,
|
||||
/**
|
||||
* The ClassModel model constructor.
|
||||
* @property {module:model/ClassModel}
|
||||
*/
|
||||
ClassModel: ClassModel,
|
||||
/**
|
||||
* The Client model constructor.
|
||||
* @property {module:model/Client}
|
||||
|
||||
120
samples/client/petstore/javascript/src/model/Capitalization.js
Normal file
120
samples/client/petstore/javascript/src/model/Capitalization.js
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(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.Capitalization = factory(root.SwaggerPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The Capitalization model module.
|
||||
* @module model/Capitalization
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Capitalization</code>.
|
||||
* @alias module:model/Capitalization
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>Capitalization</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/Capitalization} obj Optional instance to populate.
|
||||
* @return {module:model/Capitalization} The populated <code>Capitalization</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('smallCamel')) {
|
||||
obj['smallCamel'] = ApiClient.convertToType(data['smallCamel'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('CapitalCamel')) {
|
||||
obj['CapitalCamel'] = ApiClient.convertToType(data['CapitalCamel'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('small_Snake')) {
|
||||
obj['small_Snake'] = ApiClient.convertToType(data['small_Snake'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('Capital_Snake')) {
|
||||
obj['Capital_Snake'] = ApiClient.convertToType(data['Capital_Snake'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('SCA_ETH_Flow_Points')) {
|
||||
obj['SCA_ETH_Flow_Points'] = ApiClient.convertToType(data['SCA_ETH_Flow_Points'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('ATT_NAME')) {
|
||||
obj['ATT_NAME'] = ApiClient.convertToType(data['ATT_NAME'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} smallCamel
|
||||
*/
|
||||
exports.prototype['smallCamel'] = undefined;
|
||||
/**
|
||||
* @member {String} CapitalCamel
|
||||
*/
|
||||
exports.prototype['CapitalCamel'] = undefined;
|
||||
/**
|
||||
* @member {String} small_Snake
|
||||
*/
|
||||
exports.prototype['small_Snake'] = undefined;
|
||||
/**
|
||||
* @member {String} Capital_Snake
|
||||
*/
|
||||
exports.prototype['Capital_Snake'] = undefined;
|
||||
/**
|
||||
* @member {String} SCA_ETH_Flow_Points
|
||||
*/
|
||||
exports.prototype['SCA_ETH_Flow_Points'] = undefined;
|
||||
/**
|
||||
* Name of the pet
|
||||
* @member {String} ATT_NAME
|
||||
*/
|
||||
exports.prototype['ATT_NAME'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
80
samples/client/petstore/javascript/src/model/ClassModel.js
Normal file
80
samples/client/petstore/javascript/src/model/ClassModel.js
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(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.ClassModel = factory(root.SwaggerPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The ClassModel model module.
|
||||
* @module model/ClassModel
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ClassModel</code>.
|
||||
* Model for testing model with \"_class\" property
|
||||
* @alias module:model/ClassModel
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassModel</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/ClassModel} obj Optional instance to populate.
|
||||
* @return {module:model/ClassModel} The populated <code>ClassModel</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('_class')) {
|
||||
obj['_class'] = ApiClient.convertToType(data['_class'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} _class
|
||||
*/
|
||||
exports.prototype['_class'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.SwaggerPetstore);
|
||||
}
|
||||
}(this, function(expect, SwaggerPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new SwaggerPetstore.Capitalization();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('Capitalization', function() {
|
||||
it('should create an instance of Capitalization', function() {
|
||||
// uncomment below and update the code to test Capitalization
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be.a(SwaggerPetstore.Capitalization);
|
||||
});
|
||||
|
||||
it('should have the property smallCamel (base name: "smallCamel")', function() {
|
||||
// uncomment below and update the code to test the property smallCamel
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property capitalCamel (base name: "CapitalCamel")', function() {
|
||||
// uncomment below and update the code to test the property capitalCamel
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property smallSnake (base name: "small_Snake")', function() {
|
||||
// uncomment below and update the code to test the property smallSnake
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property capitalSnake (base name: "Capital_Snake")', function() {
|
||||
// uncomment below and update the code to test the property capitalSnake
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property sCAETHFlowPoints (base name: "SCA_ETH_Flow_Points")', function() {
|
||||
// uncomment below and update the code to test the property sCAETHFlowPoints
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property ATT_NAME (base name: "ATT_NAME")', function() {
|
||||
// uncomment below and update the code to test the property ATT_NAME
|
||||
//var instane = new SwaggerPetstore.Capitalization();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.SwaggerPetstore);
|
||||
}
|
||||
}(this, function(expect, SwaggerPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new SwaggerPetstore.ClassModel();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('ClassModel', function() {
|
||||
it('should create an instance of ClassModel', function() {
|
||||
// uncomment below and update the code to test ClassModel
|
||||
//var instane = new SwaggerPetstore.ClassModel();
|
||||
//expect(instance).to.be.a(SwaggerPetstore.ClassModel);
|
||||
});
|
||||
|
||||
it('should have the property _class (base name: "_class")', function() {
|
||||
// uncomment below and update the code to test the property _class
|
||||
//var instane = new SwaggerPetstore.ClassModel();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
Reference in New Issue
Block a user