Skip to content

Is it possible to disable output validation errors? #695

Locked Answered by RobinTail
ssteuteville asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ssteuteville .

If you allow your endpoint to return wrong types, then the consumer of your API will receive not the ones you promised. Thus you'd just move the errors from one place to another — your Frontend will have to deal with null instead of the expected undefined, for example.
Instead, I'd suggest to create more loose output types using .or().
The types validation is the essential goal of the library. It's intended to operate in strict mode.

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@RobinTail
Comment options

@gmazoni
Comment options

@RobinTail
Comment options

@gmazoni
Comment options

@RobinTail
Comment options

Answer selected by ssteuteville
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
not an issue Irreproducible or unrelated wontfix This will not be worked on
5 participants