Skip to content

Swagger + URI Versioning Middleware Ordering Documentation #2377

@GalvinGao

Description

@GalvinGao

I'm submitting a...

  • Regression
  • Bug report
  • Feature request
  • Documentation issue or request (new chapter/page)
  • Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

The current documentation does not mention how the swagger middleware needs to be ordered in relative to versioning middleware, where if the versioning middleware is invoked after the swagger middleware it would be emitting incorrect paths.

Expected behavior

The documentation should preferably document this behavior clearly in https://docs.nestjs.com/openapi/introduction#bootstrap where it mentions bootstrapping the OpenAPI docs.

Minimal reproduction of the problem with instructions

https://docs.nestjs.com/openapi/introduction#bootstrap

What is the motivation / use case for changing the behavior?

To clarify docs and avoid pitfalls experienced in nestjs/swagger#1495

Environment

For Tooling issues:

  • Node version: NA
  • Platform: NA

Others:

Relate to nestjs/swagger#1495

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions