-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add support for format validation #72
Comments
Hey @jdesrosiers I’m available and interested in contributing to this issue. |
Thanks for helping out! The |
Hi @jdesrosiers , I would like to work on this issue and believe I understand the problem described. I have forked and cloned the repository and tried exploring the codebase, but I couldn’t identify where to make the necessary modifications for the "format" validation. Could you please guide me on which files/modules are relevant? Also, it would be great if you could provide instructions on how to run this project locally to test my changes. |
@Vishv0407 Thanks for offering, but @techmannih is already working on it. I have no problem with multiple people working together on it, but I'll leave it up to @techmannih to decide if and how they want to bring someone else in. |
@Vishv0407 Thank you for showing your interest. I'm glad! Yes, we can discuss this issue on Slack, and we can work together in collaboration. |
@techmannih sure!, let's start discussion on slack. |
JSON Schema has never required that the
format
keyword be validated. Since 2019-09, it's been required that it's not validated by default. For these reasons, I never chose to add support for validatingformat
. I do want to support it eventually, but it's never been a priority.I think this would be a good task for someone looking to contribute to open source. It's relatively straightforward, but requires proficiency with regular expressions, attention to detail, and the ability to read and understand RFCs. For each format, you'll need to understand the syntax and determine the best way to validate it. Sometimes that will be a regular expression, sometimes you'll need to find an appropriate library. There might be a case or two where you need to write the code to validate the format yourself, but mostly this should be about finding and using the right resource. The rest is just configuring the implementation for the keyword/vocabulary.
Acceptance Criteria
date-time
date
time
duration
email
idn-email
hostname
idn-hostname
ipv4
ipv6
uri
(Use @hyperjump/uri)uri-reference
(Use @hyperjump/uri)iri
(Use @hyperjump/uri)iri-reference
(Use @hyperjump/uri)uuid
uri-template
json-pointer
relative-json-pointer
regex
true
enables validation by default but can still be disabled by configuuid
should not be validated in draft-07)date-time
,email
,hostname
,ipv4
,ipv6
,uri
date-time
,email
,hostname
,ipv4
,ipv6
,uri
,uri-reference
,uri-template
,json-pointer
date-time
,date
,time
,email
,idn-email
,hostname
,idn-hostname
,ipv4
,ipv6
,uri
,uri-reference
,iri
,iri-reference
,uri-template
,json-pointer
,relative-json-pointer
,regex
date-time
,date
,time
,duration
,email
,idn-email
,hostname
,idn-hostname
,ipv4
,ipv6
,uri
,uri-reference
,iri
,iri-reference
,uuid
,uri-template
,json-pointer
,relative-json-pointer
,regex
date-time
,date
,time
,duration
,email
,idn-email
,hostname
,idn-hostname
,ipv4
,ipv6
,uri
,uri-reference
,iri
,iri-reference
,uuid
,uri-template
,json-pointer
,relative-json-pointer
,regex
true
false
, unknown formats returntrue
true
, unknown formats throw an errortrue
uuid
in draft-07 schema)The text was updated successfully, but these errors were encountered: