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

Allow to have a more strict validation about officially registered format #1470

Closed
LasneF opened this issue Mar 5, 2024 · 2 comments
Closed

Comments

@LasneF
Copy link

LasneF commented Mar 5, 2024

Is your feature request related to a problem? Please describe.

give the specification attached , the validation says Woohoo! Your API description is valid.
that rigourously speacking it is ,

but having for a field with a format date , a value 1Y looks not correct

Describe the solution you'd like

given fields with format , if format is well known such as date , uuid, redocly should raise a warning , this as an opinionnated good practices around well known format

(notice that it is an opinionnated rules as from a strict json schema point of view format is just an annotation not a strict validation item)

Describe alternatives you've considered

moving to pattern could be an option but that is not really sustainaible especially for date, as it is spreading a complex regular expression

Additional context

here a tiny sample that show case that date are not considered

smallDate.json

@LasneF
Copy link
Author

LasneF commented Mar 5, 2024

looking carrefully there https://json-schema.org/understanding-json-schema/reference/string#format

i am not clear if it is an enhancement , or a bug as date is an official registered format

@tatomyr
Copy link
Contributor

tatomyr commented Mar 5, 2024

I'm closing this as it's a duplicate of #766.

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

No branches or pull requests

2 participants