Skip to content

[QUESTION] @Returns decorator from (@tsed/schema) oneOf merging problem. #2816

Answered by Romakita
DKorosec asked this question in Q&A
Discussion options

You must be logged in to vote

My bad, I given you the wrong code example.

The returns decorator apply by default the 401 Unauthorize model if there is no second parameters. So to fix that, gives Object as second parameters to avoid the default behavior:

@Returns(401, Object).OneOf(ClassA, ClassB)

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@DKorosec
Comment options

Comment options

You must be logged in to vote
8 replies
@Romakita
Comment options

@DKorosec
Comment options

@Romakita
Comment options

@Romakita
Comment options

Answer selected by DKorosec
@Romakita
Comment options

@DKorosec
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants