-
Notifications
You must be signed in to change notification settings - Fork 69
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
schemas: format keyword does nothing #1363
Comments
No format enforced means we can actually enforce all formats 💃 What if we actually do that? In this way we can e.g. enforce a For @harunurhan's record-editor we could then have the client code to provide a mapping between formats and validation functions... |
I forgot to add that |
We can propose an extension then. Would you mind opening an Issue in the repo? I can very see it can be implemented in a non disruptive way that could be easily get integrated. |
I think we should always have However, if it can not be described as |
|
Solution coming in inveniosoftware/invenio-records#144 |
inveniosoftware/invenio-records#144 has been merged, so now the ball is on us to write a |
Formats are validated thanks to work from @michamos in |
Oh, this is going to be fun.
In fact this is documented by the implementation of JSONSchema we use: https://github.com/Julian/jsonschema/blob/37a7bb96cacb7db6e589bdb054e49e62c4367a7e/jsonschema/_format.py#L13-L15
One could define
FormatChecker
s that implement these format checks, but then our schemas are not portable, not even between Python and JavaScript. So we should replace all them withpattern
s, which do work in JSONSchema and are standard JavaScript regular expressions.The text was updated successfully, but these errors were encountered: