Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

[Feature request]: Generate nullable properties as required

Open Eirenarch opened this issue 7 months ago • 0 comments

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

Eirenarch avatar Jul 03 '24 22:07 Eirenarch