Skip to content

[MAINTENANCE] Update ror-reconciler to use schema v2 #315

@adambuttrick

Description

@adambuttrick

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:

  1. 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 the names array and retrieve the name value where the type is ror_display or label.
      • A get_country_name(record) helper to parse the locations array and retrieve the country_name from the geonames_details.
    • Update the /reconcile, /suggest, /preview, and /flyout routes to use these new helper methods.
  2. Update the view templates (views/):

    • Modify preview.erb and flyout.erb to correctly access name and location information from the v2-compatible data structure passed by the updated app.rb.
  3. 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.rb to specifically verify that reconciliation, suggestions, and previews work correctly with the v2 data structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceWork needed to maintain long-term health/performance of code and infrastructure

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions