openapi-eller
openapi-eller copied to clipboard
Add support for handling custom date formats
trafficstars
Custom date formats are a super common "feature" of the real world, and mapping APIs to the real world, particularly with custom date formats is a pain point with OpenAPI.
There's a few ways we can go about implementing this, but having a coherent story that is easily implemented in each platform would be great.
A couple of ideas have been proposed:
- Using a custom
formatwith formatting string as a parameter, likecustom-date(mm-yyyy-DD), though this introduces parsing complexity - Using a custom field along side a well known custom format, such as:
type: string
format: custom-date
x-date-format: mm-yyyy-DD
Both have their pros and cons.