Skip to content

feat(document-builder): add support for setting extensions inside the info object#3424

Merged
kamilmysliwiec merged 1 commit intonestjs:masterfrom
daniseijo:extensions-info-section
May 5, 2025
Merged

feat(document-builder): add support for setting extensions inside the info object#3424
kamilmysliwiec merged 1 commit intonestjs:masterfrom
daniseijo:extensions-info-section

Conversation

@daniseijo
Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

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
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Currently, the extensions are only allowed at root level of the openapi document. According to the OpenAPI documentation, there are more sections where this extensions can be added.

In my case, I want to add Redocly extensions like the x-logo that is supposed to go inside the info section.

What is the new behavior?

Adds a new parameter to the addExtension method (default to root) that also allows setting extensions inside the info section.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

OpenApi extensions documentation - https://swagger.io/docs/specification/v3_0/openapi-extensions/
Redocly Info Object documentation - https://redocly.com/docs/redoc/redoc-vendor-extensions#info-object

@daniseijo daniseijo force-pushed the extensions-info-section branch from 679c266 to 9a0745e Compare April 30, 2025 14:19
@kamilmysliwiec kamilmysliwiec merged commit 2a4de7a into nestjs:master May 5, 2025
1 check passed
@kamilmysliwiec
Copy link
Copy Markdown
Member

LGTM

@daniseijo daniseijo deleted the extensions-info-section branch May 5, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants