Skip to content

How do I denote timestamp in Open API 3 specification #2565

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

Closed
smitit173 opened this issue May 5, 2021 · 3 comments
Closed

How do I denote timestamp in Open API 3 specification #2565

smitit173 opened this issue May 5, 2021 · 3 comments
Labels

Comments

@smitit173
Copy link

smitit173 commented May 5, 2021

I am trying to create a field that contains the timestamp. The data type is an integer since it is a timestamp but not sure whether we have any format that can be used distinctively to identify a timestamp in OAI 3.0.x

Currently I am denoting it as -

created_at: type: integer format: int64 minimum: 1

@smitit173 smitit173 changed the title How to denote timestamp in Open API 3 specification How do I denote timestamp in Open API 3 specification May 5, 2021
@MikeRalphson
Copy link
Member

MikeRalphson commented May 5, 2021

format is an open-valued keyword, so you can use any value you like, which is something of a blessing and a curse. I've seen examples such as:

format
timestamp
timestamp without time zone
timestamp with time zone
TIMESTAMP
unix timestamp to millisecond
Unix timestamp
timestamp ISO8601
unix timestamp
unix-time
unixtime
unix-epoch
Unix timestamp
unixtime list
unixMillis
epoch

Which is one of the reasons we started working on a format registry #845

@smitit173
Copy link
Author

thanks for the quick response :)

@i-am-the-slime
Copy link

format is an open-valued keyword, so you can use any value you like, which is something of a blessing and a curse.

Can you give an example of a situation in which this would be a blessing?

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

No branches or pull requests

3 participants