OpenAPI Config Service
Request-scoped service that manages OpenAPI configuration for the current request. Supports runtime overrides via middleware while preserving base configuration.
// In middleware (e.g., RouteAccessMiddleware)constructor( @inject(OPENAPI_TOKENS.ConfigService) private openAPIConfig: IOpenAPIConfigService) {}async handle(ctx, next) { this.openAPIConfig.override({ info: { title: 'Custom API' }, routeFilter: (path) => shouldInclude(path) }) await next()} Copy
// In middleware (e.g., RouteAccessMiddleware)constructor( @inject(OPENAPI_TOKENS.ConfigService) private openAPIConfig: IOpenAPIConfigService) {}async handle(ctx, next) { this.openAPIConfig.override({ info: { title: 'Custom API' }, routeFilter: (path) => shouldInclude(path) }) await next()}
Optional
Get effective configuration (base merged with all overrides)
Add configuration override for this request Overrides are merged in the order they are added
OpenAPI Config Service
Request-scoped service that manages OpenAPI configuration for the current request. Supports runtime overrides via middleware while preserving base configuration.
Example