Skip to content
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

Allow to set custom DocumentResolver #239

Open
filip26 opened this issue Aug 11, 2022 · 1 comment
Open

Allow to set custom DocumentResolver #239

filip26 opened this issue Aug 11, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@filip26
Copy link
Owner

filip26 commented Aug 11, 2022

Is your feature request related to a problem? Please describe.
HttpLoader can load only RDF and JSON-LD documents.

Describe the solution you'd like
Allow to set custom DocumentResolver enabling custom document loading.

Describe alternatives you've considered
Default DocumentResolver could be exposed and configurable.

@filip26 filip26 added the enhancement New feature or request label Aug 11, 2022
@filip26 filip26 added this to the 1.3.2 milestone Aug 11, 2022
@filip26 filip26 removed this from the 1.3.2 milestone Mar 16, 2023
@skodapetr
Copy link
Contributor

DocumentResolver is used in the DefaultHttpLoader, FileLoader, and ZipResourceLoader.
Those are created before the JsonLdOptions object, as a result, we can no directly set resolver using JsonLdOptions.

We could:

  • Split DocumentResolver into interface and DefaultDocumentResolver.
  • Add constructor to Loaders which would allow to set custom resolver.
    That would allow users to provide custom implementation with the added cost of manual SchemeRouter constrcution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants