Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI to use format="partial-time" for time attributes #549

Closed
andrus opened this issue Apr 26, 2022 · 1 comment
Closed

OpenAPI to use format="partial-time" for time attributes #549

andrus opened this issue Apr 26, 2022 · 1 comment
Milestone

Comments

@andrus
Copy link
Contributor

andrus commented Apr 26, 2022

Originally mentioned here:

We have noticed that openapi lost the attribute format="time" for type="string" where db time of a field is a time.

@andrus
Copy link
Contributor Author

andrus commented May 28, 2022

Actually we even had a test for this condition. Turns out Open API spec as of v3.0.3 only defines formats for "date", and "date-time". There's no "time". They are floating the ideas of a "format registry", but doesn't look like it exists.

On the other hand, the Swagger library that we are using actually has optional support for times. Will turn it on for Agrest. The format will be called partial-time (not "time").

@andrus andrus changed the title OpenAPI does not include format="time" for time attributes OpenAPI to use format="partial-time" for time attributes May 28, 2022
@andrus andrus closed this as completed May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant