mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
parent
7c20316755
commit
7faaa091cd
@ -94,7 +94,7 @@ public class TypeScriptAureliaClientCodegen extends AbstractTypeScriptClientCode
|
||||
|
||||
// Collect models to be imported
|
||||
for (CodegenParameter param : op.allParams) {
|
||||
if (!param.isPrimitiveType) {
|
||||
if (!param.isPrimitiveType && !param.isListContainer && !param.dataType.equals("any")) {
|
||||
modelImports.add(param.dataType);
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ export class {{classname}} extends Api {
|
||||
* Creates a new {{classname}} class.
|
||||
*
|
||||
* @param httpClient The Aurelia HTTP client to be injected.
|
||||
* @param authStorage A storage for authentication data.
|
||||
*/
|
||||
constructor(httpClient: HttpClient, authStorage: AuthStorage) {
|
||||
super(httpClient, authStorage);
|
||||
@ -57,7 +58,7 @@ export class {{classname}} extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}{{{path}}}`{{#pathParams}}
|
||||
.replace(`{${'{{baseName}}'}}`, encodeURIComponent(String(${params['{{paramName}}']}))){{/pathParams}};
|
||||
.replace(`{${'{{baseName}}'}}`, encodeURIComponent(`${params['{{paramName}}']}`)){{/pathParams}};
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
|
@ -15,11 +15,8 @@ import { HttpClient } from 'aurelia-http-client';
|
||||
import { Api } from './Api';
|
||||
import { AuthStorage } from './AuthStorage';
|
||||
import {
|
||||
Array<string>,
|
||||
any,
|
||||
Pet,
|
||||
ApiResponse,
|
||||
Array<'available' | 'pending' | 'sold'>,
|
||||
} from './models';
|
||||
|
||||
/**
|
||||
@ -141,7 +138,7 @@ export class PetApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/pet/{petId}`
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(String(${params['petId']})));
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(`${params['petId']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
@ -234,7 +231,7 @@ export class PetApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/pet/{petId}`
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(String(${params['petId']})));
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(`${params['petId']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
@ -297,7 +294,7 @@ export class PetApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/pet/{petId}`
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(String(${params['petId']})));
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(`${params['petId']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
@ -334,7 +331,7 @@ export class PetApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/pet/{petId}/uploadImage`
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(String(${params['petId']})));
|
||||
.replace(`{${'petId'}}`, encodeURIComponent(`${params['petId']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
|
@ -71,7 +71,7 @@ export class StoreApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/store/order/{orderId}`
|
||||
.replace(`{${'orderId'}}`, encodeURIComponent(String(${params['orderId']})));
|
||||
.replace(`{${'orderId'}}`, encodeURIComponent(`${params['orderId']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
@ -126,7 +126,7 @@ export class StoreApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/store/order/{orderId}`
|
||||
.replace(`{${'orderId'}}`, encodeURIComponent(String(${params['orderId']})));
|
||||
.replace(`{${'orderId'}}`, encodeURIComponent(`${params['orderId']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
|
@ -16,7 +16,6 @@ import { Api } from './Api';
|
||||
import { AuthStorage } from './AuthStorage';
|
||||
import {
|
||||
User,
|
||||
Array<User>,
|
||||
} from './models';
|
||||
|
||||
/**
|
||||
@ -192,7 +191,7 @@ export class UserApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/user/{username}`
|
||||
.replace(`{${'username'}}`, encodeURIComponent(String(${params['username']})));
|
||||
.replace(`{${'username'}}`, encodeURIComponent(`${params['username']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
@ -220,7 +219,7 @@ export class UserApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/user/{username}`
|
||||
.replace(`{${'username'}}`, encodeURIComponent(String(${params['username']})));
|
||||
.replace(`{${'username'}}`, encodeURIComponent(`${params['username']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
@ -309,7 +308,7 @@ export class UserApi extends Api {
|
||||
|
||||
// Create URL to call
|
||||
const url = `${this.basePath}/user/{username}`
|
||||
.replace(`{${'username'}}`, encodeURIComponent(String(${params['username']})));
|
||||
.replace(`{${'username'}}`, encodeURIComponent(`${params['username']}`));
|
||||
|
||||
const response = await this.httpClient.createRequest(url)
|
||||
// Set HTTP method
|
||||
|
Loading…
x
Reference in New Issue
Block a user