You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
In a project that I am working on, we have in our OASv3 API specification the following issue:
We wish to allow the input of some particular property to be a string with either the format date or date-time.
Currently, our specification looks as follows:
properties:
foo:
type: stringoneOf:
- format: date
- format: date-time
This validates correctly, however it does not work with the tooling we use for our Node application (oas-tools). Looking at the source code it was clear that it needed modifying. Changing it to:
However, it is unclear to me whether one or both are valid from an OASv3 standpoint. From what I can gather from OASv3 data types. Quote: "Primitives have an optional modifier property: format."
If this is the case, should not the first example fail validation?
If possible, could you help me verify the validity of the two examples above? And if the above example is invalid (as it lacks the type) then there may be a need to change the validation logic.
Thank you.
The text was updated successfully, but these errors were encountered:
In a project that I am working on, we have in our OASv3 API specification the following issue:
We wish to allow the input of some particular property to be a
string
with either the formatdate
ordate-time
.Currently, our specification looks as follows:
This validates correctly, however it does not work with the tooling we use for our Node application (oas-tools). Looking at the source code it was clear that it needed modifying. Changing it to:
This works well with the tooling.
However, it is unclear to me whether one or both are valid from an OASv3 standpoint. From what I can gather from OASv3 data types. Quote: "Primitives have an optional modifier property:
format
."If this is the case, should not the first example fail validation?
If possible, could you help me verify the validity of the two examples above? And if the above example is invalid (as it lacks the type) then there may be a need to change the validation logic.
Thank you.
The text was updated successfully, but these errors were encountered: