Merge remote-tracking branch 'origin/master' into 2.3.0

This commit is contained in:
wing328 2017-04-23 18:36:37 +08:00
commit 397b440e60
10 changed files with 108 additions and 62 deletions

View File

@ -1831,7 +1831,7 @@ public class DefaultCodegen {
currentProperty = currentProperty.items;
}
return currentProperty.isEnum;
return currentProperty == null ? false : currentProperty.isEnum;
}
protected Map<String, Object> getInnerEnumAllowableValues(CodegenProperty property) {
@ -1841,7 +1841,7 @@ public class DefaultCodegen {
currentProperty = currentProperty.items;
}
return currentProperty.allowableValues;
return currentProperty == null ? new HashMap<String, Object>() : currentProperty.allowableValues;
}
@ -1855,6 +1855,7 @@ public class DefaultCodegen {
|| Boolean.TRUE.equals(baseItem.isListContainer))) {
baseItem = baseItem.items;
}
if (baseItem != null) {
// set both datatype and datetypeWithEnum as only the inner type is enum
property.datatypeWithEnum = property.datatypeWithEnum.replace(baseItem.baseType, toEnumName(baseItem));
@ -1867,6 +1868,7 @@ public class DefaultCodegen {
property.defaultValue = property.defaultValue.replace(baseItem.baseType, toEnumName(baseItem));
}
}
}
/**
* Update datatypeWithEnum for map container
@ -1878,6 +1880,8 @@ public class DefaultCodegen {
|| Boolean.TRUE.equals(baseItem.isListContainer))) {
baseItem = baseItem.items;
}
if (baseItem != null) {
// set both datatype and datetypeWithEnum as only the inner type is enum
property.datatypeWithEnum = property.datatypeWithEnum.replace(", " + baseItem.baseType, ", " + toEnumName(baseItem));
@ -1890,6 +1894,7 @@ public class DefaultCodegen {
property.defaultValue = property.defaultValue.replace(", " + property.items.baseType, ", " + toEnumName(property.items));
}
}
}
protected void setNonArrayMapProperty(CodegenProperty property, String type) {
property.isNotContainer = true;

View File

@ -246,7 +246,8 @@ export class {{classname}} {
{{#isResponseFile}}
responseType: ResponseContentType.Blob,
{{/isResponseFile}}
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037

View File

@ -239,7 +239,8 @@ export class PetService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -289,7 +290,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -337,7 +339,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -385,7 +388,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -437,7 +441,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -482,7 +487,8 @@ export class PetService {
method: RequestMethod.Put,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -549,7 +555,8 @@ export class PetService {
method: RequestMethod.Post,
headers: headers,
body: formParams,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -617,7 +624,8 @@ export class PetService {
method: RequestMethod.Post,
headers: headers,
body: formParams,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037

View File

@ -162,7 +162,8 @@ export class StoreService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -199,7 +200,8 @@ export class StoreService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -237,7 +239,8 @@ export class StoreService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -273,7 +276,8 @@ export class StoreService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037

View File

@ -226,7 +226,8 @@ export class UserService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -262,7 +263,8 @@ export class UserService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -298,7 +300,8 @@ export class UserService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -336,7 +339,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -374,7 +378,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -416,7 +421,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -448,7 +454,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -490,7 +497,8 @@ export class UserService {
method: RequestMethod.Put,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037

View File

@ -1,4 +1,4 @@
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704172305
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704231833
### Building
@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's.
_published:_
```
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704172305 --save
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201704231833 --save
```
_unPublished (not recommended):_

View File

@ -239,7 +239,8 @@ export class PetService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -289,7 +290,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -337,7 +339,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -385,7 +388,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -437,7 +441,8 @@ export class PetService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -482,7 +487,8 @@ export class PetService {
method: RequestMethod.Put,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -549,7 +555,8 @@ export class PetService {
method: RequestMethod.Post,
headers: headers,
body: formParams,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -617,7 +624,8 @@ export class PetService {
method: RequestMethod.Post,
headers: headers,
body: formParams,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037

View File

@ -162,7 +162,8 @@ export class StoreService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -199,7 +200,8 @@ export class StoreService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -237,7 +239,8 @@ export class StoreService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -273,7 +276,8 @@ export class StoreService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037

View File

@ -226,7 +226,8 @@ export class UserService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -262,7 +263,8 @@ export class UserService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -298,7 +300,8 @@ export class UserService {
method: RequestMethod.Post,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -336,7 +339,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -374,7 +378,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -416,7 +421,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -448,7 +454,8 @@ export class UserService {
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037
@ -490,7 +497,8 @@ export class UserService {
method: RequestMethod.Put,
headers: headers,
body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612
search: queryParameters
search: queryParameters,
withCredentials:true
});
// https://github.com/swagger-api/swagger-codegen/issues/4037

View File

@ -1,6 +1,6 @@
{
"name": "@swagger/angular2-typescript-petstore",
"version": "0.0.1-SNAPSHOT.201704172305",
"version": "0.0.1-SNAPSHOT.201704231833",
"description": "swagger client for @swagger/angular2-typescript-petstore",
"author": "Swagger Codegen Contributors",
"keywords": [