comment out array of enum test case, fix JS enum partial template

This commit is contained in:
wing328 2016-06-29 21:40:22 +08:00
parent aec2f4e27c
commit 73e6626e15
26 changed files with 31 additions and 73 deletions

View File

@ -96,8 +96,20 @@ exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaul
}
{{/vars}}{{/emitModelMethods}}
{{#vars}}{{#isEnum}}{{>partial_model_inner_enum}}{{/isEnum}}{{#items.isEnum}}{{#items}}
{{>partial_model_inner_enum}}{{/items}}*/{{/items.isEnum}}{{/vars}}
{{#vars}}
{{#isEnum}}
{{^isContainer}}
{{>partial_model_inner_enum}}
{{/isContainer}}
{{/isEnum}}
{{#items.isEnum}}
{{#items}}
{{^isContainer}}
{{>partial_model_inner_enum}}
{{/isContainer}}
{{/items}}
{{/items.isEnum}}
{{/vars}}
return exports;
{{/model}}{{/models}}}));

View File

@ -1101,13 +1101,15 @@ definitions:
type: array
items:
$ref: '#/definitions/ReadOnlyFirst'
array_of_enum:
type: array
items:
type: string
enum:
- UPPER
- lower
# commented out the below test case for array of enum for the time being
# as not all language can handle it
#array_of_enum:
# type: array
# items:
# type: string
# enum:
# - UPPER
# - lower
NumberOnly:
type: object
properties:

View File

@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
- API 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
## Installation
@ -72,7 +72,7 @@ api.testCodeInjectEnd(opts, callback);
## 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
------------ | ------------- | ------------- | -------------

View File

@ -1,6 +1,6 @@
# 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
------------- | ------------- | -------------

View File

@ -55,9 +55,9 @@
/**
* The base URL against which to resolve every API call's (relative) path.
* @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.

View File

@ -86,7 +86,6 @@
return exports;
}));

View File

@ -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 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
## Installation

View File

@ -6,13 +6,5 @@ Name | Type | Description | Notes
**arrayOfString** | **[String]** | | [optional]
**arrayArrayOfInteger** | **[[Integer]]** | | [optional]
**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional]
**arrayOfEnum** | **[String]** | | [optional]
<a name="[ArrayOfEnumEnum]"></a>
## Enum: [ArrayOfEnumEnum]

View File

@ -92,7 +92,6 @@
return exports;
}));

View File

@ -94,7 +94,6 @@
return exports;
}));

View File

@ -81,7 +81,6 @@
return exports;
}));

View File

@ -100,7 +100,6 @@
return exports;
}));

View File

@ -59,7 +59,6 @@
};
/**
@ -82,9 +81,6 @@
if (data.hasOwnProperty('array_array_of_model')) {
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;
}
@ -101,37 +97,8 @@
* @member {Array.<Array.<module:model/ReadOnlyFirst>>} array_array_of_model
*/
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;
}));

View File

@ -89,7 +89,6 @@
return exports;
}));

View File

@ -92,7 +92,6 @@
return exports;
}));

View File

@ -89,7 +89,6 @@
return exports;
}));

View File

@ -115,6 +115,7 @@
* @const
*/
"lower": "lower" };
/**
* Allowed values for the <code>enum_integer</code> property.
* @enum {Integer}
@ -131,6 +132,7 @@
* @const
*/
"-1": -1 };
/**
* Allowed values for the <code>enum_number</code> property.
* @enum {Number}

View File

@ -184,7 +184,6 @@
return exports;
}));

View File

@ -93,7 +93,6 @@
return exports;
}));

View File

@ -85,7 +85,6 @@
return exports;
}));

View File

@ -110,7 +110,6 @@
return exports;
}));

View File

@ -92,7 +92,6 @@
return exports;
}));

View File

@ -84,7 +84,6 @@
return exports;
}));

View File

@ -92,7 +92,6 @@
return exports;
}));

View File

@ -141,7 +141,6 @@
return exports;
}));