Skip to content

MODLD-981: Return Hub's variant and parallel titles in GET /resource/{id} API response#438

Merged
pkjacob merged 1 commit intomasterfrom
pjacob/MODLD-981
Feb 9, 2026
Merged

MODLD-981: Return Hub's variant and parallel titles in GET /resource/{id} API response#438
pkjacob merged 1 commit intomasterfrom
pjacob/MODLD-981

Conversation

@pkjacob
Copy link
Contributor

@pkjacob pkjacob commented Feb 6, 2026

At present only Hub's primary title is returned in the GET /resource/{id} API response. This PR fixes the problem.

Copilot AI review requested due to automatic review settings February 6, 2026 21:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates title mapping so Hub resources include VariantTitle and ParallelTitle entries in the GET /resource/{id} response, and adds an E2E test to validate Hub VariantTitle behavior.

Changes:

  • Refactor VariantTitleMapperUnit and ParallelTitleMapperUnit to add title items to any parent DTO implementing HasTitle.
  • Add HubVariantTitleIT E2E test to validate VariantTitle appears in Hub API responses and is persisted in the graph.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/test/java/org/folio/linked/data/e2e/mappings/hub/title/HubVariantTitleIT.java New E2E test for Hub VariantTitle mapping/response.
src/main/java/org/folio/linked/data/mapper/dto/resource/common/title/VariantTitleMapperUnit.java Switches VariantTitle DTO mapping from concrete parent types to HasTitle.
src/main/java/org/folio/linked/data/mapper/dto/resource/common/title/ParallelTitleMapperUnit.java Switches ParallelTitle DTO mapping from concrete parent types to HasTitle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pkjacob pkjacob force-pushed the pjacob/MODLD-981 branch 4 times, most recently from fea8196 to 70a87bd Compare February 7, 2026 02:54
@pkjacob pkjacob changed the title MODLD-981: return Hub's variant and Parallel titles in GET /resource/{id} API response MODLD-981: Return Hub's variant and parallel titles in GET /resource/{id} API response Feb 7, 2026
@pkjacob pkjacob force-pushed the pjacob/MODLD-981 branch 2 times, most recently from 03a66fb to 2027c00 Compare February 7, 2026 15:02
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@pkjacob pkjacob merged commit 76f14db into master Feb 9, 2026
5 of 6 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.

3 participants