JsonApiDotNetCore icon indicating copy to clipboard operation
JsonApiDotNetCore copied to clipboard

Reflect model state validation attributes in resource object schemas

Open maurei opened this issue 3 years ago • 1 comments

The usage of RequiredAttribute on a resource field translates to a property needing to be listed as required, see required properties. This is currently already supported in the OpenApi integration, but requires more thorough testing.

Further investigation is required to see whether other model state validation attributes are associated to similar options in an OAS.

maurei avatar Sep 01 '21 12:09 maurei

See https://learn.microsoft.com/en-us/aspnet/core/mvc/models/validation#built-in-attributes and https://swagger.io/docs/specification/data-models/data-types/.

bkoelman avatar Feb 07 '24 16:02 bkoelman