Files
faunosteo/src/domain/species/equine/index.ts
T
Bastien ChanotandClaude Opus 4.7 f80e161d61 feat(schema): add findings tree + parse species JSON via Zod
Replaces the flat Pathology[] model with a hierarchical SpeciesFindings
tree (zones → categories → nested children → leaves) authored as JSON and
validated at boot. Equine catalog JSON is now wired through
SpeciesFindingsSchema.parse() so malformed data fails loudly instead of
corrupting an observation later.

Species manifest swaps `pathologies` loader for `findings`. JSON species
id renamed equin → equine to match the registry. Old equine pathology
test deleted; new findings test covers parse + FR/EN label coverage +
zone/category/leaf structure.

Foundational step of the v2 domain pivot; callers in observation/store/
UI/PDF migrated in follow-up commits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 03:48:43 +02:00

14 lines
389 B
TypeScript

import type { SpeciesManifest } from '@/domain/species/types'
import { EQUINE_VERTEBRAL_FORMULA } from './vertebrae'
export const equine: SpeciesManifest = {
id: 'equine',
labelFr: 'Cheval',
mainSvg: '/species/equine/Horse.svg',
details: {
head: '/species/equine/Horse_head.svg',
},
vertebralFormula: EQUINE_VERTEBRAL_FORMULA,
findings: () => import('./pathologies'),
}