Unexpected behavior for use_default
See original GitHub issueOn 0.6.0, I’m trying to use the new use_default_value_for_required_field
argument.
Expectation:
All fields will have a default value, no matter if they’re required or not.
Actual:
Not all fields have a default.
I’m wondering if this was meant to be an or
:
https://github.com/koxudaxi/datamodel-code-generator/blob/dbd146a26e0000d2670bc0a79fa6d73b1b5d490d/datamodel_code_generator/parser/jsonschema.py#L400
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
react-use/useDefault.md at master - GitHub
React state hook that returns the default value when state is null or undefined. Usage. import {useDefault} from 'react-use' ...
Read more >Unexpected behaviour when applying a list of lambda ...
What's happening is that your lambdas are being bound to the loop variable k rather than the value associated with it, that's all...
Read more >Error Handling - Talkdesk Studio
Each Studio component has a default, prebuilt behavior, responsible for handling the call in a predefined way in case an unexpected error occurs....
Read more >DragSelectingTool influence on PanningTool - GoJS - Northwoods ...
I have tried to use default DragSelectingTool , but it yields the same behavior. PanningTool has no modifications except for canStart where I...
Read more >Unexpected behaviour with Atlaskit Tabs
I upgraded Atlaskit Tabs to the latest 8.0.8 version (previously on 4.0.0) and notice some strange behavior. In my case, I have a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JosXa I’m sorry too late. I guess you are right. 👍 I will fix it. Thank you.
@JosXa I have released a new version as
0.6.2
This release includes two changes.use_default_on_required_field
toapply_default_values_for_required_fields
--force-optional
toenable force_optional_for_required_fields