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

Distinguish between no default value specified and a default value null specified in the OpenAPI. #4664

Open
simon-spinner opened this issue Apr 29, 2024 · 0 comments

Comments

@simon-spinner
Copy link

Schema::getDefault() today returns a null value if no default value is specified in the OpenAPI document. The OpenAPI standard allows to explicitly specify null when a property is nullable. However this case cannot be detected because Schema:getDefault() will return null in that situation, too. An additional boolean flag Schema::hasDefaultValue() would be required.

Use case is the OpenAPI generator, where I would like to generate special code if the default value is set explicitly to null.

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

No branches or pull requests

1 participant