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
URN wrongly reported as non-URI #59
Comments
Thanks, I will have a look |
There are two issues here.
|
@nichtich with the latest change from @johanlelan URIs need to have at lease a single "/" character (was two slashes). Please feel free to reopen if my suggestions above are not working for you. Thanks |
Thanks for pointing to the sources and the second issue. My original bug report, however remains: json-schema-validation spec. section 7.3.6. defines validation of the
RFC 3986 lists some examples of URIs, several of them not containing a |
👍 It would be really great if you could suggest changes to the regular expressions ajv uses (in PR or just here). |
I found this regular expression for generics URI on Regular Expression Cookbook (https://github.com/shihyu/Regular_Expressions/blob/master/O'Reilly-Regular%20Expressions%20Cookbook(2nd%20Edition).pdf)
It validates your urn @nichtich ! There is just one improvement to think about: case sensitive URIs. Hope that helps! |
Cool, thanks!. Can be just |
The problem with that regex is that it also validates URI fragments (like 'abc'), and it shouldn't... It will fail the test. I'll see how it can be changed so URI fragments don't match. |
I get the following output
The text was updated successfully, but these errors were encountered: