forked from loafle/openapi-generator-original
update TS samples
This commit is contained in:
@@ -28,8 +28,9 @@ import {
|
||||
export class TestApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for test without sending the request
|
||||
*/
|
||||
async testRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TestBaseDto>>> {
|
||||
async testRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -37,12 +38,19 @@ export class TestApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/api/v1/test`;
|
||||
|
||||
const response = await this.request({
|
||||
return {
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async testRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TestBaseDto>>> {
|
||||
const requestConfig = await this.testRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TestBaseDtoFromJSON));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user