Closed dblodgett-usgs closed 4 years ago
... alongside the rel there's a type, presumably application/ld+json (but could be other kinds of RDF, if available)... so it does get back to conneg even if we're trying to avoid that discussion.
I wouldn't say we are trying to avoid the discussion.
I think it would be valuable to illustrate how the rel
and type
html link attributes can be used in conjunction with RDF linked data from a content perspective. We should also discuss the diversity of approaches we see for network architectures and URL/API schemes to deliver this content. What I want to avoid is going down a rabbit hole and pretending that we have answers on the network architecture front.
OGC API uses these: http://docs.opengeospatial.org/is/17-069r3/17-069r3.html#_link_relations
Potentially of interest: IANA:
Non-IANA:
Others may be applicable but the above is from a quick read of what's at the link above.
Need to wrap up the ER and this won't make it -- a candidate for future work.
Migrating a comment from @alpha-beta-soup in #77 to it's own issue. Not entirely off topic for #77, but deserving of a specific issue to track the ideas.
---- original comment below.
Given the necessity and centrality of an HTML landing page, a pattern the OAFeat API hearitly endorses, then I think we need to consider the appropriate IANA link relation to recommend if implementing this pattern.
alternate
seems simplest, butdescribes
,related
,item
and perhaps others (enclosure
?) seem possible. I'm only aware of a very small subset of these and I have certainly abused and ignored them in the past. In pygeoapi at present, outbound links to non-HTML (CSV, GeoJSON or RDF/JSON-LD, etc.) representations declared from the HTML view are simplyalternate
oritem
. Is that appropriate and adequate? This isn't necessarily a question of content negotiation, but of typing links in general. However, alongside therel
there's atype
, presumablyapplication/ld+json
(but could be other kinds of RDF, if available)... so it does get back to conneg even if we're trying to avoid that discussion.pygeoapi in practice:
head
: https://github.com/spatialdaotearoa/pygeoapi/blob/ld-json/pygeoapi/templates/base.html#L16body
: https://github.com/spatialdaotearoa/pygeoapi/blob/ld-json/pygeoapi/templates/collection.html#L33 (i.e. the "Links" part of this page: https://demo.pygeoapi.io/master/collections/obs)