Use JSON-LD link if found for HTML injection #1954
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Use JSON-LD link if found during link creation to render JSON-LD in default HTML templates. For requests that require a parameter like EDR, pygeoapi throws an error when trying to inject the JSON-LD to the HTML template because it does not include the necessary query arguments. This PR updates the behavior such that if a JSON-LD link is found, it is then subsequently used to fetch the json-ld that is injected because it will contain the additional query arguments to fetch the appropriate url.
Related Issue / discussion
#859
cgs-earth/RISE-EDR-Mappings#16
Additional information
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)