show alternate formats which are listed in links#2384
Draft
pvgenuchten wants to merge 2 commits into
Draft
Conversation
2da5e74 to
727648c
Compare
Member
|
While there are genuine limits to serving an incomplete view of the collection, might this overflow for a collection like |
Contributor
Author
|
Yes, great point @webb-ben, i wondered if we can cluster similar requests and showing their formats as a list? Eg: item detail (json, jsonld, html, csv, …) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Related Issue / discussion
this came up in #2376; in coverages, there is no json-ld, still the json-ld link was shown, clicking it causes an error
on the other hand there are no links to other formats, such as jsonfg, csv, shapefile, grib2 etc
this PR solves the issue, it still needs testing against various providers/services, as it may give unexpected results
Additional information
in pygeoapi links are either advertised in response.links or response.data.links, so check both for the links element, some format such as cov-json do not have a links element, in that case the html data seems also not having the links element.
a mapping would be needed to translate mimetype (from link@type) to link-text, maybe the ?f=xxx format is expected, or the trans module can be used?
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)