mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 16:06:09 +00:00
Adds spec additionalProperties + nullable examples (#2405)
* Adds v2 spec additionalproperties examples, adds v3 spec nulllable model example, updates samples * Remaining samples updates * Adds csharp generator update to handle models with multilevel parent types, which works for the AdditionalPropertiesObject model, samples updated
This commit is contained in:
committed by
William Cheng
parent
c10463600a
commit
b67318ef21
@@ -13,7 +13,14 @@
|
||||
|
||||
|
||||
import ApiClient from './ApiClient';
|
||||
import AdditionalPropertiesAnyType from './model/AdditionalPropertiesAnyType';
|
||||
import AdditionalPropertiesArray from './model/AdditionalPropertiesArray';
|
||||
import AdditionalPropertiesBoolean from './model/AdditionalPropertiesBoolean';
|
||||
import AdditionalPropertiesClass from './model/AdditionalPropertiesClass';
|
||||
import AdditionalPropertiesInteger from './model/AdditionalPropertiesInteger';
|
||||
import AdditionalPropertiesNumber from './model/AdditionalPropertiesNumber';
|
||||
import AdditionalPropertiesObject from './model/AdditionalPropertiesObject';
|
||||
import AdditionalPropertiesString from './model/AdditionalPropertiesString';
|
||||
import Animal from './model/Animal';
|
||||
import ApiResponse from './model/ApiResponse';
|
||||
import ArrayOfArrayOfNumberOnly from './model/ArrayOfArrayOfNumberOnly';
|
||||
@@ -96,12 +103,54 @@ export {
|
||||
*/
|
||||
ApiClient,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesAnyType model constructor.
|
||||
* @property {module:model/AdditionalPropertiesAnyType}
|
||||
*/
|
||||
AdditionalPropertiesAnyType,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesArray model constructor.
|
||||
* @property {module:model/AdditionalPropertiesArray}
|
||||
*/
|
||||
AdditionalPropertiesArray,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesBoolean model constructor.
|
||||
* @property {module:model/AdditionalPropertiesBoolean}
|
||||
*/
|
||||
AdditionalPropertiesBoolean,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesClass model constructor.
|
||||
* @property {module:model/AdditionalPropertiesClass}
|
||||
*/
|
||||
AdditionalPropertiesClass,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesInteger model constructor.
|
||||
* @property {module:model/AdditionalPropertiesInteger}
|
||||
*/
|
||||
AdditionalPropertiesInteger,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesNumber model constructor.
|
||||
* @property {module:model/AdditionalPropertiesNumber}
|
||||
*/
|
||||
AdditionalPropertiesNumber,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesObject model constructor.
|
||||
* @property {module:model/AdditionalPropertiesObject}
|
||||
*/
|
||||
AdditionalPropertiesObject,
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesString model constructor.
|
||||
* @property {module:model/AdditionalPropertiesString}
|
||||
*/
|
||||
AdditionalPropertiesString,
|
||||
|
||||
/**
|
||||
* The Animal model constructor.
|
||||
* @property {module:model/Animal}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesAnyType model module.
|
||||
* @module model/AdditionalPropertiesAnyType
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesAnyType {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesAnyType</code>.
|
||||
* @alias module:model/AdditionalPropertiesAnyType
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesAnyType.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesAnyType</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/AdditionalPropertiesAnyType} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesAnyType} The populated <code>AdditionalPropertiesAnyType</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesAnyType();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Object');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
AdditionalPropertiesAnyType.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesAnyType;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesArray model module.
|
||||
* @module model/AdditionalPropertiesArray
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesArray {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesArray</code>.
|
||||
* @alias module:model/AdditionalPropertiesArray
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesArray.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesArray</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/AdditionalPropertiesArray} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesArray} The populated <code>AdditionalPropertiesArray</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesArray();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Array');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
AdditionalPropertiesArray.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesArray;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesBoolean model module.
|
||||
* @module model/AdditionalPropertiesBoolean
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesBoolean {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesBoolean</code>.
|
||||
* @alias module:model/AdditionalPropertiesBoolean
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesBoolean.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesBoolean</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/AdditionalPropertiesBoolean} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesBoolean} The populated <code>AdditionalPropertiesBoolean</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesBoolean();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Boolean');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
AdditionalPropertiesBoolean.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesBoolean;
|
||||
|
||||
@@ -47,11 +47,38 @@ class AdditionalPropertiesClass {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesClass();
|
||||
|
||||
if (data.hasOwnProperty('map_property')) {
|
||||
obj['map_property'] = ApiClient.convertToType(data['map_property'], {'String': 'String'});
|
||||
if (data.hasOwnProperty('map_string')) {
|
||||
obj['map_string'] = ApiClient.convertToType(data['map_string'], {'String': 'String'});
|
||||
}
|
||||
if (data.hasOwnProperty('map_of_map_property')) {
|
||||
obj['map_of_map_property'] = ApiClient.convertToType(data['map_of_map_property'], {'String': {'String': 'String'}});
|
||||
if (data.hasOwnProperty('map_number')) {
|
||||
obj['map_number'] = ApiClient.convertToType(data['map_number'], {'String': 'Number'});
|
||||
}
|
||||
if (data.hasOwnProperty('map_integer')) {
|
||||
obj['map_integer'] = ApiClient.convertToType(data['map_integer'], {'String': 'Number'});
|
||||
}
|
||||
if (data.hasOwnProperty('map_boolean')) {
|
||||
obj['map_boolean'] = ApiClient.convertToType(data['map_boolean'], {'String': 'Boolean'});
|
||||
}
|
||||
if (data.hasOwnProperty('map_array_integer')) {
|
||||
obj['map_array_integer'] = ApiClient.convertToType(data['map_array_integer'], {'String': ['Number']});
|
||||
}
|
||||
if (data.hasOwnProperty('map_array_anytype')) {
|
||||
obj['map_array_anytype'] = ApiClient.convertToType(data['map_array_anytype'], {'String': [Object]});
|
||||
}
|
||||
if (data.hasOwnProperty('map_map_string')) {
|
||||
obj['map_map_string'] = ApiClient.convertToType(data['map_map_string'], {'String': {'String': 'String'}});
|
||||
}
|
||||
if (data.hasOwnProperty('map_map_anytype')) {
|
||||
obj['map_map_anytype'] = ApiClient.convertToType(data['map_map_anytype'], {'String': {'String': Object}});
|
||||
}
|
||||
if (data.hasOwnProperty('anytype_1')) {
|
||||
obj['anytype_1'] = ApiClient.convertToType(data['anytype_1'], Object);
|
||||
}
|
||||
if (data.hasOwnProperty('anytype_2')) {
|
||||
obj['anytype_2'] = ApiClient.convertToType(data['anytype_2'], Object);
|
||||
}
|
||||
if (data.hasOwnProperty('anytype_3')) {
|
||||
obj['anytype_3'] = ApiClient.convertToType(data['anytype_3'], Object);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
@@ -61,14 +88,59 @@ class AdditionalPropertiesClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Object.<String, String>} map_property
|
||||
* @member {Object.<String, String>} map_string
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_property'] = undefined;
|
||||
AdditionalPropertiesClass.prototype['map_string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Object.<String, String>>} map_of_map_property
|
||||
* @member {Object.<String, Number>} map_number
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_of_map_property'] = undefined;
|
||||
AdditionalPropertiesClass.prototype['map_number'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Number>} map_integer
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_integer'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Boolean>} map_boolean
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_boolean'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Array.<Number>>} map_array_integer
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_array_integer'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Array.<Object>>} map_array_anytype
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_array_anytype'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Object.<String, String>>} map_map_string
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_map_string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Object.<String, Object>>} map_map_anytype
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['map_map_anytype'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object} anytype_1
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['anytype_1'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object} anytype_2
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['anytype_2'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object} anytype_3
|
||||
*/
|
||||
AdditionalPropertiesClass.prototype['anytype_3'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesInteger model module.
|
||||
* @module model/AdditionalPropertiesInteger
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesInteger {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesInteger</code>.
|
||||
* @alias module:model/AdditionalPropertiesInteger
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesInteger.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesInteger</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/AdditionalPropertiesInteger} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesInteger} The populated <code>AdditionalPropertiesInteger</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesInteger();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Number');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
AdditionalPropertiesInteger.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesInteger;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesNumber model module.
|
||||
* @module model/AdditionalPropertiesNumber
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesNumber {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesNumber</code>.
|
||||
* @alias module:model/AdditionalPropertiesNumber
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesNumber.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesNumber</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/AdditionalPropertiesNumber} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesNumber} The populated <code>AdditionalPropertiesNumber</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesNumber();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Number');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
AdditionalPropertiesNumber.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesNumber;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesObject model module.
|
||||
* @module model/AdditionalPropertiesObject
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesObject {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesObject</code>.
|
||||
* @alias module:model/AdditionalPropertiesObject
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesObject.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesObject</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/AdditionalPropertiesObject} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesObject} The populated <code>AdditionalPropertiesObject</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesObject();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Object');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
AdditionalPropertiesObject.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesObject;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* OpenAPI 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
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AdditionalPropertiesString model module.
|
||||
* @module model/AdditionalPropertiesString
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class AdditionalPropertiesString {
|
||||
/**
|
||||
* Constructs a new <code>AdditionalPropertiesString</code>.
|
||||
* @alias module:model/AdditionalPropertiesString
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AdditionalPropertiesString.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AdditionalPropertiesString</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/AdditionalPropertiesString} obj Optional instance to populate.
|
||||
* @return {module:model/AdditionalPropertiesString} The populated <code>AdditionalPropertiesString</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AdditionalPropertiesString();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'String');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
AdditionalPropertiesString.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AdditionalPropertiesString;
|
||||
|
||||
Reference in New Issue
Block a user