Skip to content

chore(schema): allow string-valued issue/volume in citation references#37

Merged
Bissbert merged 1 commit into
mainfrom
chore/widen-citation-schema-numerics
May 13, 2026
Merged

chore(schema): allow string-valued issue/volume in citation references#37
Bissbert merged 1 commit into
mainfrom
chore/widen-citation-schema-numerics

Conversation

@Bissbert
Copy link
Copy Markdown
Contributor

Summary

  • Widens the journalReferenceSchema in src/content/config.ts to accept either z.number().int() or z.string() for both volume and issue.
  • Unblocks the v1.3.0 content sync from gemmology-knowledge: equipment/conoscope.yaml references Read (2014) with issue: "1–4" (a legitimate combined-issue range from Gemmology chapter citations) which Astro's content collection validator was rejecting with Expected type "number", received "string".

Background

After WA1+WA2+WA5 merged in gemmology-knowledge and v1.3.0 was tagged, npm run build failed schema validation on equipment/conoscope.yaml and phenomena/asterism.yaml. The cleanest fix is to widen the Zod schema; string-valued issues are valid in CSL-JSON and Gems & Gemology routinely publishes combined issues.

Test plan

  • npm run sync succeeds (138 files)
  • npm run validate:citations reports 0 errors / 0 warnings
  • npm run build completes with 913 pages and no schema errors

Some Gems & Gemology entries cite combined issues (e.g. "1–4") which can't
be expressed as integers. Widen the journal-reference Zod schema to accept
either int or string for volume and issue.

Unblocks the v1.3.0 content sync (gemmology-knowledge equipment/conoscope.yaml
declares issue: "1–4" against Read 2014 chapter range).
@Bissbert Bissbert merged commit 8d4bdae into main May 13, 2026
3 of 4 checks passed
@Bissbert Bissbert deleted the chore/widen-citation-schema-numerics branch May 13, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant