Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Specifying format on properties? #220

Open
ChlorideCull opened this issue Sep 13, 2019 · 2 comments
Open

Specifying format on properties? #220

ChlorideCull opened this issue Sep 13, 2019 · 2 comments

Comments

@ChlorideCull
Copy link

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.

@Shwetap05
Copy link
Member

@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.

@christopher-bonitz
Copy link

christopher-bonitz commented Feb 19, 2020

@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.
image

The class
image

Example generated from code.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants