Skip to content

Conversation

@ccaspers
Copy link
Contributor

@ccaspers ccaspers commented Dec 3, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

Related PR to update docs can be found here:

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?

Issue Number: 2671

What is the new behavior?

When using the @ApiSchema decorator, it is now possible to specify the model's description.

@ApiSchema({ description: "Model Description"})
class Model {
   // ...
} 

When rendering the openapi spec, the description will be added to document like this:

{
  // ...
  "schemas": {
    "Model": {
      "type": "object",
      "description": "Model Description"
      //...
    }
  }
  // ...
}

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@ccaspers ccaspers mentioned this pull request Dec 3, 2024
1 task
Co-authored-by: Kamil Mysliwiec <[email protected]>
@kamilmysliwiec kamilmysliwiec merged commit e579904 into nestjs:master Dec 4, 2024
1 check passed
@kamilmysliwiec
Copy link
Member

LGTM

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.

2 participants