diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index bb2bf5a660..fd2020347d 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -35,6 +35,7 @@ declare -a scripts=( "./bin/php-slim-server-petstore.sh" "./bin/php-ze-ph-petstore-server.sh" "./bin/openapi3/php-petstore.sh" +"./bin/typescript-angularjs-petstore.sh" "./bin/typescript-angular-petstore-all.sh" "./bin/typescript-aurelia-petstore.sh" "./bin/typescript-axios-petstore-all.sh" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java index c51c1d89b1..7621cbe370 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java @@ -74,7 +74,7 @@ public class TypeScriptAngularJsClientCodegen extends AbstractTypeScriptClientCo @Override public void postProcessParameter(CodegenParameter parameter) { super.postProcessParameter(parameter); - parameter.dataType = addModelPrefix(parameter.dataType); + // parameter.dataType = addModelPrefix(parameter.dataType); } private String getIndexDirectory() { diff --git a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION index 6d94c9c2e1..afa6365606 100644 --- a/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angularjs/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.0-SNAPSHOT \ No newline at end of file +4.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angularjs/api/PetApi.ts b/samples/client/petstore/typescript-angularjs/api/PetApi.ts index 841d482e31..6b03c0f45f 100644 --- a/samples/client/petstore/typescript-angularjs/api/PetApi.ts +++ b/samples/client/petstore/typescript-angularjs/api/PetApi.ts @@ -29,22 +29,22 @@ export class PetApi { /** * * @summary Add a new pet to the store - * @param pet Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store */ - public addPet (pet: models.models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { + public addPet (body: models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); - // verify required parameter 'pet' is not null or undefined - if (pet === null || pet === undefined) { - throw new Error('Required parameter pet was null or undefined when calling addPet.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling addPet.'); } let httpRequestParams: ng.IRequestConfig = { method: 'POST', url: localVarPath, - data: pet, + data: body, params: queryParameters, headers: headerParams }; @@ -183,22 +183,22 @@ export class PetApi { /** * * @summary Update an existing pet - * @param pet Pet object that needs to be added to the store + * @param body Pet object that needs to be added to the store */ - public updatePet (pet: models.models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { + public updatePet (body: models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); - // verify required parameter 'pet' is not null or undefined - if (pet === null || pet === undefined) { - throw new Error('Required parameter pet was null or undefined when calling updatePet.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updatePet.'); } let httpRequestParams: ng.IRequestConfig = { method: 'PUT', url: localVarPath, - data: pet, + data: body, params: queryParameters, headers: headerParams }; diff --git a/samples/client/petstore/typescript-angularjs/api/StoreApi.ts b/samples/client/petstore/typescript-angularjs/api/StoreApi.ts index 59775b7f9e..7b66c58e56 100644 --- a/samples/client/petstore/typescript-angularjs/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angularjs/api/StoreApi.ts @@ -109,22 +109,22 @@ export class StoreApi { /** * * @summary Place an order for a pet - * @param order order placed for purchasing the pet + * @param body order placed for purchasing the pet */ - public placeOrder (order: models.models.Order, extraHttpRequestParams?: any ) : ng.IHttpPromise { + public placeOrder (body: models.Order, extraHttpRequestParams?: any ) : ng.IHttpPromise { const localVarPath = this.basePath + '/store/order'; let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); - // verify required parameter 'order' is not null or undefined - if (order === null || order === undefined) { - throw new Error('Required parameter order was null or undefined when calling placeOrder.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling placeOrder.'); } let httpRequestParams: ng.IRequestConfig = { method: 'POST', url: localVarPath, - data: order, + data: body, params: queryParameters, headers: headerParams }; diff --git a/samples/client/petstore/typescript-angularjs/api/UserApi.ts b/samples/client/petstore/typescript-angularjs/api/UserApi.ts index eca5ad8055..4079be4dec 100644 --- a/samples/client/petstore/typescript-angularjs/api/UserApi.ts +++ b/samples/client/petstore/typescript-angularjs/api/UserApi.ts @@ -29,22 +29,22 @@ export class UserApi { /** * This can only be done by the logged in user. * @summary Create user - * @param user Created user object + * @param body Created user object */ - public createUser (user: models.models.User, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { + public createUser (body: models.User, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user'; let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); - // verify required parameter 'user' is not null or undefined - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling createUser.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUser.'); } let httpRequestParams: ng.IRequestConfig = { method: 'POST', url: localVarPath, - data: user, + data: body, params: queryParameters, headers: headerParams }; @@ -58,22 +58,22 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param modelsUser List of user object + * @param body List of user object */ - public createUsersWithArrayInput (modelsUser: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { + public createUsersWithArrayInput (body: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/createWithArray'; let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); - // verify required parameter 'modelsUser' is not null or undefined - if (modelsUser === null || modelsUser === undefined) { - throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithArrayInput.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); } let httpRequestParams: ng.IRequestConfig = { method: 'POST', url: localVarPath, - data: modelsUser, + data: body, params: queryParameters, headers: headerParams }; @@ -87,22 +87,22 @@ export class UserApi { /** * * @summary Creates list of users with given input array - * @param modelsUser List of user object + * @param body List of user object */ - public createUsersWithListInput (modelsUser: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { + public createUsersWithListInput (body: Array, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/createWithList'; let queryParameters: any = {}; let headerParams: any = (Object).assign({}, this.defaultHeaders); - // verify required parameter 'modelsUser' is not null or undefined - if (modelsUser === null || modelsUser === undefined) { - throw new Error('Required parameter modelsUser was null or undefined when calling createUsersWithListInput.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); } let httpRequestParams: ng.IRequestConfig = { method: 'POST', url: localVarPath, - data: modelsUser, + data: body, params: queryParameters, headers: headerParams }; @@ -239,9 +239,9 @@ export class UserApi { * This can only be done by the logged in user. * @summary Updated user * @param username name that need to be deleted - * @param user Updated user object + * @param body Updated user object */ - public updateUser (username: string, user: models.models.User, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { + public updateUser (username: string, body: models.User, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); @@ -252,15 +252,15 @@ export class UserApi { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } - // verify required parameter 'user' is not null or undefined - if (user === null || user === undefined) { - throw new Error('Required parameter user was null or undefined when calling updateUser.'); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updateUser.'); } let httpRequestParams: ng.IRequestConfig = { method: 'PUT', url: localVarPath, - data: user, + data: body, params: queryParameters, headers: headerParams };