diff --git a/packages/schema/src/json-schema/document.ts b/packages/schema/src/json-schema/document.ts index 592bfeb7d..c07365fe7 100644 --- a/packages/schema/src/json-schema/document.ts +++ b/packages/schema/src/json-schema/document.ts @@ -6,14 +6,20 @@ import { zodToJsonSchema } from "zod-to-json-schema"; import { CSLData } from "../common/csl/data.js"; import { CSLDateVariable } from "../common/csl/date-variable.js"; import { CSLNameVariable } from "../common/csl/name-variable.js"; -import { NewLTPDocument } from "../new-document.js"; -import { AnySpecies } from "../species/index.js"; +import { Key } from "../key.js"; +import { AnySpecies, Composition, Element } from "../species/index.js"; +import { VersionInfo } from "../version-info.js"; +import { VersionedLTPDocument } from "../versioned-document.js"; -export const LTPDocumentJSONSchema = zodToJsonSchema(NewLTPDocument, { +export const LTPDocumentJSONSchema = zodToJsonSchema(VersionedLTPDocument, { definitions: { + Key, + VersionInfo, CSLData, CSLNameVariable, CSLDateVariable, + Element, + Composition, AnySpecies, ...Object.fromEntries(AnySpecies.optionsMap), }, diff --git a/packages/schema/src/species/species.test.ts b/packages/schema/src/species/species.test.ts index bdcd54f74..ec5ed6aa1 100644 --- a/packages/schema/src/species/species.test.ts +++ b/packages/schema/src/species/species.test.ts @@ -456,7 +456,7 @@ describe("State serialization", () => { S: 0, parity: "g", reflection: "+", - vibrational: "10+", + vibrational: "0,n,0", }, }, { @@ -468,13 +468,13 @@ describe("State serialization", () => { latex: "\\mathrm{X}^{1}\\Sigma_\\mathrm{g}^+", summary: "X^1S_g^+", vibrational: { - latex: "10+", - summary: "10+", + latex: "0,n,0", + summary: "0,n,0", }, }, latex: - "\\mathrm{CO_{2}}\\left(\\mathrm{X}^{1}\\Sigma_\\mathrm{g}^+\\left(10+\\right)\\right)", - summary: "CO2{X^1S_g^+{10+}}", + "\\mathrm{CO_{2}}\\left(\\mathrm{X}^{1}\\Sigma_\\mathrm{g}^+\\left(0,n,0\\right)\\right)", + summary: "CO2{X^1S_g^+{0,n,0}}", }, ], [