mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
Migrate to the latest openapi-ts
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import type { BaseHttpRequest } from "./core/BaseHttpRequest";
|
||||
import type { OpenAPIConfig } from "./core/OpenAPI";
|
||||
import { Interceptors } from "./core/OpenAPI";
|
||||
import { AxiosHttpRequest } from "./core/AxiosHttpRequest";
|
||||
|
||||
import { DefaultService } from "./services/DefaultService";
|
||||
import { DefaultService } from "./services.gen";
|
||||
|
||||
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
||||
|
||||
@@ -25,6 +26,10 @@ export class OpenApi {
|
||||
PASSWORD: config?.PASSWORD,
|
||||
HEADERS: config?.HEADERS,
|
||||
ENCODE_PATH: config?.ENCODE_PATH,
|
||||
interceptors: {
|
||||
request: config?.interceptors?.request ?? new Interceptors(),
|
||||
response: config?.interceptors?.response ?? new Interceptors(),
|
||||
},
|
||||
});
|
||||
|
||||
this.default = new DefaultService(this.request);
|
||||
|
||||
Reference in New Issue
Block a user