-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
🧩 Integration conflict with NestJS interceptors
Labels: bug, nestjs, middleware
Framework context: NestJS with global interceptors (e.g., LoggingInterceptor, CacheInterceptor)
Description:
When the Openapi SDK is used inside a NestJS provider or service, global interceptors fail to intercept outbound requests.
This happens because the SDK overrides the internal Axios instance, bypassing Nest’s dependency injection and middleware hooks.
Workaround:
Manually wrap SDK calls in a custom Axios adapter — cumbersome and breaks the standard NestJS DI pattern.
Proposal:
Allow injection of a custom axios instance during initialization:
Openapi.configure({ httpClient: myAxiosInstance });