-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Feature request]: Generate nullable properties as required #2969
Comments
@Eirenarch Maybe this PR meets your need. |
Looks like it. Has it shipped yet? |
Yes - if you look at the tags on the merged commit you can see the tags for the releases that contain it: 85fefe4 |
@martincostello I think this could be a feature that was added in #2710, unfortunately did not get merged. You don't need to put the required keyword on every non nullable property. Ohh wait it was added in #2803.. I have to check if all the usesCases are solved |
@martincostello this can be closed.. You have the required keyword that works as expected (If you mark this over a property makes the property required in the OpenApi). |
Is your feature request related to a specific problem? Or an existing feature?
When generating OpenAPI json in most cases it is desirable that non-nullable properties are marked as required. As far as I can tell currently this can be achieved by adding a filter like the one described here. While this is not very hard I think that this feature is desirable for the vast majority of projects so it would be good if it is available out of the box.
Describe the solution you'd like
Maybe a parameter on the SupportNonNullableReferenceTypes method to enable this behavior
The text was updated successfully, but these errors were encountered: