forked from loafle/openapi-generator-original
comment out array of enum test case, fix JS enum partial template
This commit is contained in:
parent
aec2f4e27c
commit
73e6626e15
@ -96,8 +96,20 @@ exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaul
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{/vars}}{{/emitModelMethods}}
|
{{/vars}}{{/emitModelMethods}}
|
||||||
{{#vars}}{{#isEnum}}{{>partial_model_inner_enum}}{{/isEnum}}{{#items.isEnum}}{{#items}}
|
{{#vars}}
|
||||||
{{>partial_model_inner_enum}}{{/items}}*/{{/items.isEnum}}{{/vars}}
|
{{#isEnum}}
|
||||||
|
{{^isContainer}}
|
||||||
|
{{>partial_model_inner_enum}}
|
||||||
|
{{/isContainer}}
|
||||||
|
{{/isEnum}}
|
||||||
|
{{#items.isEnum}}
|
||||||
|
{{#items}}
|
||||||
|
{{^isContainer}}
|
||||||
|
{{>partial_model_inner_enum}}
|
||||||
|
{{/isContainer}}
|
||||||
|
{{/items}}
|
||||||
|
{{/items.isEnum}}
|
||||||
|
{{/vars}}
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
{{/model}}{{/models}}}));
|
{{/model}}{{/models}}}));
|
||||||
|
@ -1101,13 +1101,15 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/ReadOnlyFirst'
|
$ref: '#/definitions/ReadOnlyFirst'
|
||||||
array_of_enum:
|
# commented out the below test case for array of enum for the time being
|
||||||
type: array
|
# as not all language can handle it
|
||||||
items:
|
#array_of_enum:
|
||||||
type: string
|
# type: array
|
||||||
enum:
|
# items:
|
||||||
- UPPER
|
# type: string
|
||||||
- lower
|
# enum:
|
||||||
|
# - UPPER
|
||||||
|
# - lower
|
||||||
NumberOnly:
|
NumberOnly:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
|||||||
|
|
||||||
- API version: 1.0.0 ' \" =end
|
- API version: 1.0.0 ' \" =end
|
||||||
- Package version: 1.0.0 =end
|
- Package version: 1.0.0 =end
|
||||||
- Build date: 2016-06-28T23:09:17.545+08:00
|
- Build date: 2016-06-29T21:40:05.384+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@ -72,7 +72,7 @@ api.testCodeInjectEnd(opts, callback);
|
|||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
|
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# SwaggerPetstoreEnd.FakeApi
|
# SwaggerPetstoreEnd.FakeApi
|
||||||
|
|
||||||
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
|
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
@ -55,9 +55,9 @@
|
|||||||
/**
|
/**
|
||||||
* The base URL against which to resolve every API call's (relative) path.
|
* The base URL against which to resolve every API call's (relative) path.
|
||||||
* @type {String}
|
* @type {String}
|
||||||
* @default https://petstore.swagger.io */ ' " =end/v2 */ ' " =end
|
* @default https://petstore.swagger.io ' \" =end/v2 ' \" =end
|
||||||
*/
|
*/
|
||||||
this.basePath = 'https://petstore.swagger.io */ ' " =end/v2 */ ' " =end'.replace(/\/+$/, '');
|
this.basePath = 'https://petstore.swagger.io ' \" =end/v2 ' \" =end'.replace(/\/+$/, '');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The authentication methods to be included for all API calls.
|
* The authentication methods to be included for all API calls.
|
||||||
|
@ -86,7 +86,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version: 1.0.0
|
- Package version: 1.0.0
|
||||||
- Build date: 2016-06-28T23:09:39.810+08:00
|
- Build date: 2016-06-29T21:39:55.793+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
@ -6,13 +6,5 @@ Name | Type | Description | Notes
|
|||||||
**arrayOfString** | **[String]** | | [optional]
|
**arrayOfString** | **[String]** | | [optional]
|
||||||
**arrayArrayOfInteger** | **[[Integer]]** | | [optional]
|
**arrayArrayOfInteger** | **[[Integer]]** | | [optional]
|
||||||
**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional]
|
**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional]
|
||||||
**arrayOfEnum** | **[String]** | | [optional]
|
|
||||||
|
|
||||||
|
|
||||||
<a name="[ArrayOfEnumEnum]"></a>
|
|
||||||
## Enum: [ArrayOfEnumEnum]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -94,7 +94,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -81,7 +81,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -100,7 +100,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -82,9 +81,6 @@
|
|||||||
if (data.hasOwnProperty('array_array_of_model')) {
|
if (data.hasOwnProperty('array_array_of_model')) {
|
||||||
obj['array_array_of_model'] = ApiClient.convertToType(data['array_array_of_model'], [[ReadOnlyFirst]]);
|
obj['array_array_of_model'] = ApiClient.convertToType(data['array_array_of_model'], [[ReadOnlyFirst]]);
|
||||||
}
|
}
|
||||||
if (data.hasOwnProperty('array_of_enum')) {
|
|
||||||
obj['array_of_enum'] = ApiClient.convertToType(data['array_of_enum'], ['String']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -101,37 +97,8 @@
|
|||||||
* @member {Array.<Array.<module:model/ReadOnlyFirst>>} array_array_of_model
|
* @member {Array.<Array.<module:model/ReadOnlyFirst>>} array_array_of_model
|
||||||
*/
|
*/
|
||||||
exports.prototype['array_array_of_model'] = undefined;
|
exports.prototype['array_array_of_model'] = undefined;
|
||||||
/**
|
|
||||||
* @member {Array.<module:model/ArrayTest.ArrayOfEnumEnum>} array_of_enum
|
|
||||||
*/
|
|
||||||
exports.prototype['array_of_enum'] = undefined;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allowed values for the <code>array_of_enum</code> property.
|
|
||||||
* @enum {[String]}
|
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
exports.[ArrayOfEnumEnum] = {
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allowed values for the <code>arrayOfEnum</code> property.
|
|
||||||
* @enum {String}
|
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
exports.ArrayOfEnumEnum = {
|
|
||||||
/**
|
|
||||||
* value: "UPPER"
|
|
||||||
* @const
|
|
||||||
*/
|
|
||||||
"UPPER": "UPPER",
|
|
||||||
/**
|
|
||||||
* value: "lower"
|
|
||||||
* @const
|
|
||||||
*/
|
|
||||||
"lower": "lower" };
|
|
||||||
*/
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
@ -89,7 +89,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -89,7 +89,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -115,6 +115,7 @@
|
|||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
"lower": "lower" };
|
"lower": "lower" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allowed values for the <code>enum_integer</code> property.
|
* Allowed values for the <code>enum_integer</code> property.
|
||||||
* @enum {Integer}
|
* @enum {Integer}
|
||||||
@ -131,6 +132,7 @@
|
|||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
"-1": -1 };
|
"-1": -1 };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allowed values for the <code>enum_number</code> property.
|
* Allowed values for the <code>enum_number</code> property.
|
||||||
* @enum {Number}
|
* @enum {Number}
|
||||||
|
@ -184,7 +184,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -100,7 +100,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -93,7 +93,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -85,7 +85,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -110,7 +110,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -141,7 +141,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user