-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Service/repository
ror-community/ror-reconciler
Describe the current state/issue
The ror-reconciler interacts with the ROR API, which is currently configured to serve v1 as the default response version for any requests that do not specify a version in the URL path. As part of the planned sunset of the v1 API at the end of 2025, the default response version will be switched to v2 of the ROR schema in July of 2025, as described in #314.
When the default API version switches to v2, the reconciler will fail because the reconciler is not set up to parse the v2 response structure.
Describe the desired state/solution
ror-reconciler should be updated to be compatible with the v2 schema:
-
Update logic in (
app.rb):- Introduce new helper methods to correctly extract data from the v2 JSON schema.
- A
get_display_name(record)helper to parse thenamesarray and retrieve the name value where the type isror_displayorlabel. - A
get_country_name(record)helper to parse thelocationsarray and retrieve thecountry_namefrom thegeonames_details.
- A
- Update the
/reconcile,/suggest,/preview, and/flyoutroutes to use these new helper methods.
- Introduce new helper methods to correctly extract data from the v2 JSON schema.
-
Update the view templates (
views/):- Modify
preview.erbandflyout.erbto correctly access name and location information from the v2-compatible data structure passed by the updatedapp.rb.
- Modify
-
Update test suite (
spec/):- Since the API response will change, the existing VCR cassettes must be deleted and re-recorded to capture interactions with the v2 schema.
- New tests should be added to
spec/reconciliation_spec.rbto specifically verify that reconciliation, suggestions, and previews work correctly with the v2 data structure.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status