Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AxelDavid45
Copy link
Contributor

…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

@micalevisk
Copy link
Member

micalevisk commented Feb 4, 2022

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
Copy link
Contributor Author

@micalevisk Done, is it OK?

@micalevisk
Copy link
Member

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

some indentation

@AxelDavid45
Copy link
Contributor Author

@micalevisk Added indentation

@kamilmysliwiec kamilmysliwiec requested a review from jmcdo29 June 17, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants