Skip to content

Normalize taxonomy response shape across sequence-based and accession-based targets #698

@bencap

Description

@bencap

Background

After #697, taxonomy is stored on TargetGene for both target types but surfaces differently in GET responses:

  • Sequence-based: target_gene.target_sequence.taxonomy — preserved from the existing response shape via serialization shim
  • Accession-based: target_gene.taxonomy — new field added by #CHILD2

This inconsistency is intentional in #CHILD2 to avoid a breaking response change, but it should not be a permanent state. Clients must handle two different locations for the same concept depending on which target type they are reading.

Proposed Changes

Expose taxonomy at target_gene.taxonomy for both target types. Remove taxonomy from the target_sequence response object, which then contains only sequence-type, label, and literal sequence data.

This is a breaking response change and should be coordinated and communicated with consumers.

Breaking Changes

Change Breaking?
TargetSequence response Remove taxonomy field response
TargetGene response taxonomy present for both target types additive for sequence-based

Migration Notes

No data migration required. This is a serialization-only change — taxonomy_id already lives on TargetGene after #697. Only the view model and any client code reading target_sequence.taxonomy needs updating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    app: backendTask implementation touches the backendapp: frontendTask implementation touches the frontendtype: enhancementEnhancement to an existing featuretype: maintenanceMaintaining this project

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions