Skip to content
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

Use default value for ref property #1202

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

github-abcde
Copy link

When the OpenAPI spec contains an optional enum property with a default value, the default value is ignored and is always set to UNSET in the generated client (current behavior).

This PR attempts to address this, checking if a default is defined for a referenced property and applying that. If no default is defined on the property itself, the current behavior is applied (fetching the default from the parent if present and falling back to None (UNSET) if absent).

I hope I've provided everything required in this PR, but if not, please let me know :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant