-
Notifications
You must be signed in to change notification settings - Fork 32
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
Using json schema format rather than defined patterns #5
Labels
infrastructure
Update to code or repo infrastructure.
Comments
@malloryfreeberg This may be of interest to what you're currently reviewing. |
Have we used this now? @daniwelter @malloryfreeberg Can this issue be closed? |
@daniwelter added date-time format to many fields. We didn't change the email field, but I will make that change now and tag this issue so that it closes when we merge. |
daniwelter
added a commit
that referenced
this issue
Feb 8, 2018
…rmat Changed from pattern to format for email field. Fixes #5.
Pattern has been replaced in all instances where a format is available. |
This was referenced Feb 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JSON schema has a tag called format which allows you to specify a string field should match a given format
It would be good for date, email and URI files to use this for validation rather than patterns as is currently the case.
Looking at contact.json
"email": {
"description": "Email of contact for contributingauthors",
"pattern": "^.@...*$",
"type": "string"
},
would be expressed as
"email": {
"description": "Email of contact for contributingauthors",
"type": "string"
"format": "email"
},
The full list of formats can be found here
http://json-schema.org/latest/json-schema-validation.html#rfc.section.8.3
This would seem much more in keeping with the idea of using JSON schema to valid content
The text was updated successfully, but these errors were encountered: