-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
p2Medium priorityMedium priority
Milestone
Description
In my project we do not distinguish between required and nullable: false. If a type is non-nullable, it is also required. This is regardless if it is a value type or reference type.
It would be great if one could optionally configure Swashbuckle to set all non-nullable properties to required. E.g. like: setupAction.MarkNonNullableTypesAsRequired(); This way, I could remove all my [Required] annotations on the non-nullable C# properties.
This is a subsequent request following #1686. As originally posted by @felschr in #1686 (comment) , treating non-nullable as required is the default for nullable contexts in .NET validation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p2Medium priorityMedium priority