harrel56/json-schema

Respect URI equivalance when referencing schemas

Closed this issue · 0 comments

Suggestion appeared in #66. Resolving schemas by URI can be based on URI equivalance as it's described in RFC.

This means that URIs pairs like:

  • https://test.com -> HTTPS://test.com
  • https://test.com -> https://TEST.com
  • https://test.com -> https://test.COM
  • https://test.com/%2F -> https://test.com/%2f
    should be resolve to the same schema.

As pointed by @kool79 java URI class handles these cases nicely. So instead of string based comparison, URI class based comparison should be used. This seems like a rather edge case scenario, so this is more like a reminder.