-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
If a property is annotated with [JsonProperty(Required = Required.DisallowNull)]
, the output openapi schema indicates such field as a required field.
From the description of the DisallowNull
: The property is not required but it cannot be a null value.
This in my opinion makes more sense to not mark a particular property required, because in fact it is not required. The meaning of this setting is to make sure to provide a value if the property name is defined, thus more defining the expected parsing behavior & format of the provided json, compared to the actually requiring that field to be present in the json file.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request