Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs(openapi): Add docs to throw different exceptions under the same ... #2198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AxelDavid45 wants to merge 1 commit into nestjs:master
base: master
Choose a base branch
Loading
from AxelDavid45:patch-2

Conversation

Copy link
Contributor

@AxelDavid45 AxelDavid45 commented Feb 4, 2022

...http code

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
  • Docs
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

I think it's worthy to add this part to the docs because the decorator @ApiExtraModels() doesn't have an concrete example of its implementation.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Member

micalevisk commented Feb 4, 2022
edited
Loading

can you add a hint at the end to tell from where refs is imported? I didn't find any reference to this utility in the docs yet

Like this one

image

AxelDavid45 reacted with thumbs up emoji

Copy link
Contributor Author

@micalevisk Done, is it OK?

Copy link
Member

@Injectable()
export class CatController {
 @ApiExtraModels(BadAppCodeException, BadEmailException)
 @ApiBadRequestResponse({
 schema: {
 oneOf: refs(BadAppCodeException, BadEmailException),
 },
 })
 multipleErrorsResponse() { ... }
}

some indentation

AxelDavid45 reacted with thumbs up emoji

Copy link
Contributor Author

@micalevisk Added indentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@jmcdo29 jmcdo29 Awaiting requested review from jmcdo29

1 more reviewer

@micalevisk micalevisk micalevisk approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /