feat(domain): sheet document schema v2 — references registry, review_status, vertebral count_range; SQL gate + pgTAP 008

This commit is contained in:
bchanot committed 2026-10-09 16:30:58 +02:00
1 parent 6c5b2b7754
commit 3dbbfdf1df
19 files changed
+474 -71

No files matched your search

@@ -25,13 +25,14 @@ function stubClient(content: unknown) {
}
const publishable = {
schema_version: 1,
schema_version: 2,
species_id: 'equine',
name: { fr: 'Test', en: 'Test' },
description: {},
scope_disclaimer: {},
attribution: { authors: [], license: null, notes: null },
vertebral_config: { regions: [] },
references: [],
categories: [],
views: [
{
@@ -67,7 +68,7 @@ describe('publishSheetVersion', () => {
})
it('refuses a document that does not match the schema', async () => {
const { client, rpcCalls } = stubClient({ schema_version: 2 })
const { client, rpcCalls } = stubClient({ schema_version: 1 })
await expect(publishSheetVersion(client, 'v1')).rejects.toThrow()
expect(rpcCalls).toEqual([])
})