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.
Background
After #697, taxonomy is stored on
TargetGenefor both target types but surfaces differently in GET responses:target_gene.target_sequence.taxonomy— preserved from the existing response shape via serialization shimtarget_gene.taxonomy— new field added by #CHILD2This 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
taxonomyattarget_gene.taxonomyfor both target types. Removetaxonomyfrom thetarget_sequenceresponse 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
TargetSequenceresponsetaxonomyfieldTargetGeneresponsetaxonomypresent for both target typesMigration Notes
No data migration required. This is a serialization-only change —
taxonomy_idalready lives onTargetGeneafter #697. Only the view model and any client code readingtarget_sequence.taxonomyneeds updating.