MODLD-981: Return Hub's variant and parallel titles in GET /resource/{id} API response#438
Merged
MODLD-981: Return Hub's variant and parallel titles in GET /resource/{id} API response#438
GET /resource/{id} API response#438Conversation
There was a problem hiding this comment.
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
VariantTitleMapperUnitandParallelTitleMapperUnitto add title items to any parent DTO implementingHasTitle. - Add
HubVariantTitleITE2E 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.
src/test/java/org/folio/linked/data/e2e/mappings/hub/title/HubVariantTitleIT.java
Outdated
Show resolved
Hide resolved
src/test/java/org/folio/linked/data/e2e/mappings/hub/title/HubVariantTitleIT.java
Outdated
Show resolved
Hide resolved
src/test/java/org/folio/linked/data/e2e/mappings/hub/title/HubVariantTitleIT.java
Show resolved
Hide resolved
...ain/java/org/folio/linked/data/mapper/dto/resource/common/title/ParallelTitleMapperUnit.java
Show resolved
Hide resolved
fea8196 to
70a87bd
Compare
GET /resource/{id} API response
03a66fb to
2027c00
Compare
PBobylev
approved these changes
Feb 9, 2026
zepheiryan
approved these changes
Feb 9, 2026
…{id} API response
2027c00 to
470e370
Compare
|
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.



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