OpenAPI.NET.CSharpAnnotations
OpenAPI.NET.CSharpAnnotations copied to clipboard
Specifying format on properties?
I can't find any way to set a format such as "date" on a property, as defined in the OAS 3.0 spec.
It's automatically set to "date-time" on DateTime objects, but I want to set it to "date" as that's the format that the JsonConverter I have on the property converts it to.
@ChlorideCull Yes we currently do not have a way to specify "date" this needs to be fixed. I will get back to you on the ETA for the fix.
@Shwetap05 did you have a chance to get an ETA on this? I've stumbled upon a similar case where I use a string field to circumvent the issue, had some other issues longer down the pipe, so would prefer to just mark date as a format.
Just to show the impact this currently have, I'll add my case here as well. For some reason it detects yyyy-MM-dd as a date in strings, this then behaves as datetime, whom is quite wrong for my application. Have a look yourself.
Our current docs.
The class
Example generated from code.