docs.nestjs.com icon indicating copy to clipboard operation
docs.nestjs.com copied to clipboard

docs(openapi): prefer lazy over eager creation of the document

Open H4ad opened this issue 1 year ago • 3 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/nestjs/docs.nestjs.com/blob/master/CONTRIBUTING.md

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [x] Docs
  • [ ] Other... Please describe:

What is the current behavior?

NestJS does not use the new feature of lazy initialization of Swagger, which adds some time to startup.

Associated with https://github.com/nestjs/swagger/pull/2392

What is the new behavior?

Now, by default, we use always the lazy initialization in favor of the initialization speed.

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

H4ad avatar Apr 17 '23 16:04 H4ad