-
Notifications
You must be signed in to change notification settings - Fork 29
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
Proposal to add a standard for defining durations for API Design guidelines #137
Comments
@jpengar FYI above |
The duration format proposed by OpenAPI Initiative refers to - RFC3339,
It is more related to OAS 3.1 as indicated here: #93 (comment) |
Thanks for pointing it out in your comment: Formats Registry. What is your recommendation for
|
Without presenting an own opinion I would like to mention two use cases of "duration" which we are currently using in QualityOnDemand (and the sub project is aware that this need to consolidated, see camaraproject/QualityOnDemand#249):
|
It is maybe worth to note that RFC3339 explicitly does not cover time periods but only timestamps:
The grammar given in Annex A is informal. In addition is the duration format on its own ambiguous regarding the total number of days in a calendar year and calendar month if not used within a "period" (with defined start or end timestamp). A way forward could be to use duration format with the restrictions defined within the Java Class Duration, but without the minus signs:
|
Discussion #144 |
@Kevsy Definitions of duration similar to QoD QoSProfiles are also present in Connectivity Insights subproject. Is string duration format suitable for this use case? |
Problem description
Proposal to add a standard for defining durations for CAMARA APIs.
Possible evolution
Use ISO 8601 Durations as the definition for duration.
Under API Design Guidelines: 11.5 Data Definitions, add a bullet point to define duration, with reference to ISO 8601 Durations, with the following type and format.
If the format of a string is
duration
, the following sentence must be present in thedescription
: 'It must follow ISO 8601 Durations'Alternative solution
N.A
Additional context
Have a common definition for duration when designing CAMARA APIs.
Example: Searching or querying records for the previous stated time duration:
PS. Referring to wikipedia
The text was updated successfully, but these errors were encountered: