Replies: 4 comments 2 replies
-
In short: there is no way to run transformations without validations. |
Beta Was this translation helpful? Give feedback.
-
I understand, but currently there is no easy way of avoiding that risk. We have to parse the output produced by the endpoint's handler against the output schema since it may contain transformations or basically any type based on If you have any ideas on how to overcome this and avoid a big mess at the same time — you're welcome for any suggestions. @elmeister |
Beta Was this translation helpful? Give feedback.
-
I've just realized that the reason for such cases could be that you didn't enable strict mode in your tsconfig file. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello
Thanks for the amazing library, it is clear that the project is made professionally and with ❤️
Regarding the question about output validation, raised in #647 and #695
Your point is clear - types should be guaranteed - and this point is respectable
Though in production API with real users, we can't allow ourselves to let API go haywire when someone used
undefined
instead ofnull
.Could you please reconsider adding an option to change this behaviour and add some flag to be able to still let initial payload pass through without any transformation? We would happily use this option to report a problem in bugsnag and take further actions.
Since as it is now, it's not usable for us, risks and cost of any error are too high and where before everything was handled "somehow", now it will become a complete disaster.
There are many cases apparently (including ours) when people are moving to your library to make things better, but these risks are stopping us from proceeding safely.
Beta Was this translation helpful? Give feedback.
All reactions