You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating swagger specifications, the controllers fields in RoutingControllersOptions is actually ignored
Metadata information is taken from a global variable.
My problem is that I would like to generate 2 separate swagger for 2 different sets of controllers, but they get merged as I am not able to separate them using the controllers field
Code to reproduce:
import { v1Controllers } from './controllers/http/v1';
v1Controllers;
export function generateV1API(): OpenAPIObject {
const v1ApiOptions: RoutingControllersOptions = {
controllers: [],
routePrefix: '/v1',
defaultErrorHandler: false,
validation: {
whitelist: true,
},
defaults: {
// with this option, null will return 204 by default
nullResultCode: 204,
// with this option, void or Promise<void> will return 204 by default
undefinedResultCode: 204,
},
};
Even with an empty controllers array [], the controllers are added to the result OpenAPIObject
The text was updated successfully, but these errors were encountered:
Looks like I'm having the same issue as well, but there's no solution yet. I have two sets of APIs, one open to internal members and one open to external members, and I want to generate two different sets of API documents for different target users. What is your final solution?
When generating swagger specifications, the
controllers
fields in RoutingControllersOptions is actually ignoredMetadata information is taken from a global variable.
My problem is that I would like to generate 2 separate swagger for 2 different sets of controllers, but they get merged as I am not able to separate them using the
controllers
fieldCode to reproduce:
Even with an empty controllers array [], the controllers are added to the result OpenAPIObject
The text was updated successfully, but these errors were encountered: