Skip to content

Commit 73e6626

Browse files
committed
comment out array of enum test case, fix JS enum partial template
1 parent aec2f4e commit 73e6626

26 files changed

+31
-73
lines changed

modules/swagger-codegen/src/main/resources/Javascript/partial_model_generic.mustache

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,20 @@ exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaul
9696
}
9797

9898
{{/vars}}{{/emitModelMethods}}
99-
{{#vars}}{{#isEnum}}{{>partial_model_inner_enum}}{{/isEnum}}{{#items.isEnum}}{{#items}}
100-
{{>partial_model_inner_enum}}{{/items}}*/{{/items.isEnum}}{{/vars}}
99+
{{#vars}}
100+
{{#isEnum}}
101+
{{^isContainer}}
102+
{{>partial_model_inner_enum}}
103+
{{/isContainer}}
104+
{{/isEnum}}
105+
{{#items.isEnum}}
106+
{{#items}}
107+
{{^isContainer}}
108+
{{>partial_model_inner_enum}}
109+
{{/isContainer}}
110+
{{/items}}
111+
{{/items.isEnum}}
112+
{{/vars}}
101113

102114
return exports;
103115
{{/model}}{{/models}}}));

modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,13 +1101,15 @@ definitions:
11011101
type: array
11021102
items:
11031103
$ref: '#/definitions/ReadOnlyFirst'
1104-
array_of_enum:
1105-
type: array
1106-
items:
1107-
type: string
1108-
enum:
1109-
- UPPER
1110-
- lower
1104+
# commented out the below test case for array of enum for the time being
1105+
# as not all language can handle it
1106+
#array_of_enum:
1107+
# type: array
1108+
# items:
1109+
# type: string
1110+
# enum:
1111+
# - UPPER
1112+
# - lower
11111113
NumberOnly:
11121114
type: object
11131115
properties:

samples/client/petstore-security-test/javascript/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
66

77
- API version: 1.0.0 ' \" =end
88
- Package version: 1.0.0 =end
9-
- Build date: 2016-06-28T23:09:17.545+08:00
9+
- Build date: 2016-06-29T21:40:05.384+08:00
1010
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
1111

1212
## Installation
@@ -72,7 +72,7 @@ api.testCodeInjectEnd(opts, callback);
7272

7373
## Documentation for API Endpoints
7474

75-
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
75+
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
7676

7777
Class | Method | HTTP request | Description
7878
------------ | ------------- | ------------- | -------------

samples/client/petstore-security-test/javascript/docs/FakeApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SwaggerPetstoreEnd.FakeApi
22

3-
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
3+
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------

samples/client/petstore-security-test/javascript/src/ApiClient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
/**
5656
* The base URL against which to resolve every API call's (relative) path.
5757
* @type {String}
58-
* @default https://petstore.swagger.io */ ' " =end/v2 */ ' " =end
58+
* @default https://petstore.swagger.io ' \" =end/v2 ' \" =end
5959
*/
60-
this.basePath = 'https://petstore.swagger.io */ ' " =end/v2 */ ' " =end'.replace(/\/+$/, '');
60+
this.basePath = 'https://petstore.swagger.io ' \" =end/v2 ' \" =end'.replace(/\/+$/, '');
6161

6262
/**
6363
* The authentication methods to be included for all API calls.

samples/client/petstore-security-test/javascript/src/model/ModelReturn.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686

8787

8888

89-
9089
return exports;
9190
}));
9291

samples/client/petstore/javascript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
66

77
- API version: 1.0.0
88
- Package version: 1.0.0
9-
- Build date: 2016-06-28T23:09:39.810+08:00
9+
- Build date: 2016-06-29T21:39:55.793+08:00
1010
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
1111

1212
## Installation

samples/client/petstore/javascript/docs/ArrayTest.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,5 @@ Name | Type | Description | Notes
66
**arrayOfString** | **[String]** | | [optional]
77
**arrayArrayOfInteger** | **[[Integer]]** | | [optional]
88
**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional]
9-
**arrayOfEnum** | **[String]** | | [optional]
10-
11-
12-
<a name="[ArrayOfEnumEnum]"></a>
13-
## Enum: [ArrayOfEnumEnum]
14-
15-
16-
179

1810

samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292

9393

9494

95-
9695
return exports;
9796
}));
9897

samples/client/petstore/javascript/src/model/Animal.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494

9595

9696

97-
9897
return exports;
9998
}));
10099

0 commit comments

Comments
 (0)