0

I have to change the path of the swagger json file, in nestjs documentation it is http://localhost:3000/api-json but for the standard have to keep it

http://localhost:3000/api/openapi.json

Let me know if there is any possible solution for it.

Krish909
  • 77
  • 2
  • 12

1 Answers1

2

since v6.2 of @nestjs/swagger you can change that value using the jsonDocumentUrl/yamlDocumentUrl option like so:

SwaggerModule.setup('api', app, document, {
  jsonDocumentUrl: 'openapi.json'
});
Micael Levi
  • 5,054
  • 2
  • 16
  • 27