Skip to content

Commit

Permalink
fix #5845 (template dir)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Aug 7, 2017
1 parent 43e53da commit 3cbf7ee
Show file tree
Hide file tree
Showing 17 changed files with 69 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ public String getHelp() {

@Override
public void processOpts() {
if (additionalProperties.containsKey(USE_ES6)) {
setUseES6(convertPropertyToBooleanAndWriteBack(USE_ES6));
} else {
setUseES6(true); // default to ES6
}
super.processOpts();

// default HIDE_GENERATION_TIMESTAMP to true
Expand Down Expand Up @@ -266,11 +271,6 @@ public void processOpts() {
if (additionalProperties.containsKey(EMIT_JS_DOC)) {
setEmitJSDoc(convertPropertyToBooleanAndWriteBack(EMIT_JS_DOC));
}
if (additionalProperties.containsKey(USE_ES6)) {
setUseES6(convertPropertyToBooleanAndWriteBack(USE_ES6));
} else {
setUseES6(true); // default to ES6
}
}

@Override
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/javascript-es6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key
- **Location**: HTTP header

### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string

### http_basic_test

- **Type**: HTTP basic authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ To test class name in snake case
### Example
```javascript
import SwaggerPetstore from 'swagger_petstore';
let defaultClient = SwaggerPetstore.ApiClient.instance;

// Configure API key authorization: api_key_query
let api_key_query = defaultClient.authentications['api_key_query'];
api_key_query.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query.apiKeyPrefix = 'Token';

let apiInstance = new SwaggerPetstore.Fake_classname_tags123Api();

Expand Down Expand Up @@ -43,7 +50,7 @@ Name | Type | Description | Notes

### Authorization

No authorization required
[api_key_query](../README.md#api_key_query)

### HTTP request headers

Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/javascript-es6/src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default class ApiClient {
*/
this.authentications = {
'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'},
'api_key_query': {type: 'apiKey', 'in': 'query', name: 'api_key_query'},
'http_basic_test': {type: 'basic'},
'petstore_auth': {type: 'oauth2'}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class Fake_classname_tags123Api {
let formParams = {
};

let authNames = [];
let authNames = ['api_key_query'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = Client;
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/javascript-promise-es6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key
- **Location**: HTTP header

### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string

### http_basic_test

- **Type**: HTTP basic authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ To test class name in snake case
### Example
```javascript
import SwaggerPetstore from 'swagger_petstore';
let defaultClient = SwaggerPetstore.ApiClient.instance;

// Configure API key authorization: api_key_query
let api_key_query = defaultClient.authentications['api_key_query'];
api_key_query.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query.apiKeyPrefix = 'Token';

let apiInstance = new SwaggerPetstore.Fake_classname_tags123Api();

Expand All @@ -41,7 +48,7 @@ Name | Type | Description | Notes

### Authorization

No authorization required
[api_key_query](../README.md#api_key_query)

### HTTP request headers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default class ApiClient {
*/
this.authentications = {
'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'},
'api_key_query': {type: 'apiKey', 'in': 'query', name: 'api_key_query'},
'http_basic_test': {type: 'basic'},
'petstore_auth': {type: 'oauth2'}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class Fake_classname_tags123Api {
let formParams = {
};

let authNames = [];
let authNames = ['api_key_query'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = Client;
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/javascript-promise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key
- **Location**: HTTP header

### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string

### http_basic_test

- **Type**: HTTP basic authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ To test class name in snake case
### Example
```javascript
var SwaggerPetstore = require('swagger_petstore');
var defaultClient = SwaggerPetstore.ApiClient.instance;

// Configure API key authorization: api_key_query
var api_key_query = defaultClient.authentications['api_key_query'];
api_key_query.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query.apiKeyPrefix = 'Token';

var apiInstance = new SwaggerPetstore.Fake_classname_tags123Api();

Expand All @@ -41,7 +48,7 @@ Name | Type | Description | Notes

### Authorization

No authorization required
[api_key_query](../README.md#api_key_query)

### HTTP request headers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
*/
this.authentications = {
'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'},
'api_key_query': {type: 'apiKey', 'in': 'query', name: 'api_key_query'},
'http_basic_test': {type: 'basic'},
'petstore_auth': {type: 'oauth2'}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
var formParams = {
};

var authNames = [];
var authNames = ['api_key_query'];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = Client;
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key
- **Location**: HTTP header

### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string

### http_basic_test

- **Type**: HTTP basic authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ To test class name in snake case
### Example
```javascript
var SwaggerPetstore = require('swagger_petstore');
var defaultClient = SwaggerPetstore.ApiClient.instance;

// Configure API key authorization: api_key_query
var api_key_query = defaultClient.authentications['api_key_query'];
api_key_query.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key_query.apiKeyPrefix = 'Token';

var apiInstance = new SwaggerPetstore.Fake_classname_tags123Api();

Expand Down Expand Up @@ -44,7 +51,7 @@ Name | Type | Description | Notes

### Authorization

No authorization required
[api_key_query](../README.md#api_key_query)

### HTTP request headers

Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/javascript/src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
*/
this.authentications = {
'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'},
'api_key_query': {type: 'apiKey', 'in': 'query', name: 'api_key_query'},
'http_basic_test': {type: 'basic'},
'petstore_auth': {type: 'oauth2'}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
var formParams = {
};

var authNames = [];
var authNames = ['api_key_query'];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = Client;
Expand Down

0 comments on commit 3cbf7ee

Please sign in to comment.