Issue with default value for additional property (oneOf) #270
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After #268 was merged it seems like additional properties in the generated model has an incorrect default value.
The test for discriminatedOneOf illustrates the issue: StateBMode has it's default value set to a non existent enum value - which looks like the value of the discriminator field.
I would love to assist with a fix, but I am simply not familiar enough with the codebase to be able to identify where to start.I have taken my best shot at fixing the issue. Let me know what you think.
I notice that the ordering of properties in the model is different from the order in the spec, but perhaps that's intentional?