Skip to content

Add configurable additional links to /collections - #215

Merged
jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:collections-links-203
Oct 22, 2026
Merged

jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:collections-links-203

Conversation

@jampukka

@jampukka jampukka commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #203. A fourth configurable link source for the top-level links of /collections (JSON and HTML), alongside the three from #177.

  • api.collections.links.*
    • Same shape as api.links.*: api.collections.links=a,b plus <name>.href/rel/type/title (hreflang optional)
    • Deliberately not the issue's collections.links=a,b,c: that would collide with a collection named links
  • HakunaConfigParser.readCollectionsAdditionalLinks() / FeatureServiceConfig.collectionsAdditionalLinks
    • Reuses readLinksWithPrefix; the Localized* wrapper delegates to the wrapped service (links are not translated)
  • collections.ftl
    • New "Additional Resources" section listing the response's links except self and alternate, which the page already renders itself

To note:

  • Fully opt-in
  • A configured link missing any of href/rel/type/title fails startup, as with the other three sources
  • A configured link with rel=self or rel=alternate appears in the JSON but not in the HTML section; fixing that needs a change to CollectionsContent, left out on purpose
  • docker/cfg/addresses.properties now shows three such links: the INSPIRE-required describedby + application/xml metadata record, the recommended text/html variant of the same record, and a license link.

@jampukka jampukka added this to the 2.1.0 milestone Aug 31, 2026
@jampukka
jampukka force-pushed the collections-links-203 branch from 83ebbc1 to 81a4f22 Compare October 22, 2026 13:43
@jampukka
jampukka force-pushed the collections-links-203 branch from 81a4f22 to 82991a7 Compare October 22, 2026 13:48
@jampukka
jampukka merged commit 2f4302b into nlsfi:main Oct 22, 2026
2 checks passed
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.

Add additional links to /collections response

1 participant