Skip to content

Fix/#166 uri support #167

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

Merged
merged 4 commits into from
Jun 24, 2019
Merged

Fix/#166 uri support #167

merged 4 commits into from
Jun 24, 2019

Conversation

jawaff
Copy link
Contributor

@jawaff jawaff commented Jun 24, 2019

To summarize what I did:

  • Lots of term changes because we no longer deal with just URLs.
  • The JsonSchemaFactory.Builder is now able to be configured with URIFactories and URIFetchers. These factories and fetchers are able to be associated with a number of URI schemes.
  • A default URIFactory and URIFetcher is configured for our custom Classpath URLs and standard URLs. (These can be overridden if the user wishes).
  • The JsonSchemaFactory accepts a URISchemeFactory and URISchemeFetcher that are configured with the scheme->factory/fetcher maps. The factory and fetchers are chosen based on the URI scheme that is needed.
  • The URL mapping feature should now work with URIs in general.
  • URIs are created using the JsonSchemaFactory's URIFactory (which is the URISchemeFactory).
  • A URI's stream is fetched with the JsonSchemaFactory's URIFetcher (which is the URISchemeFetcher).

I'll make any changes that are necessary.

@jawaff
Copy link
Contributor Author

jawaff commented Jun 24, 2019

I think I've got everything working. Let me know what you all think. We can talk design and maybe figure out a better solution if you'd like. This is mostly just a proposition and I'm open to changing the approach.

@jawaff
Copy link
Contributor Author

jawaff commented Jun 24, 2019

This pull request is meant for fixing issue #166. (I'm trying to get Github to link this to the issue).

@stevehu stevehu merged commit 45a8084 into networknt:master Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants