To ignore a global prefix for routes set through
SwaggerModule provides a way to support multiple specifications. In other words, you can serve different documentation, with different UIs, on different endpoints.
To support multiple specifications, your application must be written with a modular approach. The
createDocument() method takes a 3rd argument,
extraOptions, which is an object with a property named
include property takes a value which is an array of modules.
You can setup multiple specifications support as shown below:
Now you can start your server with the following command:
http://localhost:3000/api/cats to see the Swagger UI for cats:
http://localhost:3000/api/dogs will expose the Swagger UI for dogs: