mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 10:35:25 +00:00
[Typescript AngularJS] fix Extra package prefix in api parameters operations (#2522)
This commit is contained in:
parent
c81c09b941
commit
f4fa941e2b
@ -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"
|
||||
|
@ -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() {
|
||||
|
@ -1 +1 @@
|
||||
3.3.0-SNAPSHOT
|
||||
4.0.0-SNAPSHOT
|
@ -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 = (<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 = (<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
|
||||
};
|
||||
|
@ -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<models.Order> {
|
||||
public placeOrder (body: models.Order, extraHttpRequestParams?: any ) : ng.IHttpPromise<models.Order> {
|
||||
const localVarPath = this.basePath + '/store/order';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = (<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
|
||||
};
|
||||
|
@ -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 = (<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<models.User>, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> {
|
||||
public createUsersWithArrayInput (body: Array<models.User>, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> {
|
||||
const localVarPath = this.basePath + '/user/createWithArray';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = (<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<models.User>, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> {
|
||||
public createUsersWithListInput (body: Array<models.User>, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> {
|
||||
const localVarPath = this.basePath + '/user/createWithList';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = (<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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user