-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
coerceTypes is all or nothing #243
Comments
thanks @jtinbergen. good point. we'll look into it |
this sounds like the same problem as described in #249 (comment). thoughts? |
@jtinbergen i've put together a PR which attempts to solve these issues via a behavioral change.
as a result, the thoughts? |
fixed in |
When you do not want coerceTypes to correct malformed payloads sent into your API you MUST mark your openAPI parameters as String or no API call will succeed.
/test/{number}/detail/{number2}
This call will fail since parameters are always strings (you do not have a choice!).
Ideally you would want to always coerce parameters when possible (since you don't have a choice in sending them as string) and let the body/payload optionally be coerced if desired.
The text was updated successfully, but these errors were encountered: