-
Notifications
You must be signed in to change notification settings - Fork 947
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
fix: Ensure strict typing for input defaults to prevent runtime errors #5604
base: develop
Are you sure you want to change the base?
fix: Ensure strict typing for input defaults to prevent runtime errors #5604
Conversation
@Malaydewangan09 Hi, here my QA feedback:
- id: time
type: TIME
# ERROR: 'String is not a RFC3339 time.'
defaults: "10:11:12"
required: false |
Hey @yuri1969
Jackson will not throw error ? |
Hey @yuri1969 Thanks! So when the validate API is triggered, We have to do the default value checks outside the scope of Jackson Mapper, right ? Because for case
Can we have a custom deserializer for the default value? |
@Malaydewangan09 I'm not really familiar with advanced Jackson usage, sorry 😐 |
@MilosPaunovic @loicmathieu can you help me with this? |
@Malaydewangan09 I need to take some time to investigate. @yuri1969 as I understand it, we previously accept non-standard LocalTime string representation, and with the change it would not work anymore. I need to dig but their may not be any way to fix that. But I'm worry about the breaking change here. |
@loicmathieu The way to keep the current format might be to somehow assign a custom JSON Schema "type" for the |
What changes are being made and why?
This PR addresses the issue (#5590) where untyped input defaults could lead to runtime errors. By switching to a strongly typed generic parameter for inputs, we ensure that defaults are properly validated during schema generation, thereby reducing unexpected behaviors at execution time.
closes #5590