Goal
Add an experimental CLI that reads a JTD schema (RFC 8927) and generates an ES2020 ESM validator exporting validate() for browser BroadcastChannel payload validation.
Scope (deliberately limited)
Support only:
properties
optionalProperties
type primitives
enum
metadata.id
Reject the rest (elements, values, discriminator/mapping, ref/definitions, nested properties) with:
Unsupported JTD feature: <feature>. This experimental tool only supports flat schemas with properties, optionalProperties, type, and enum.
Deliverables
- New Maven module producing a shaded
jtd-esm-codegen uber-jar (CLI entry point).
- Code in package
io.github.simbo1905.json.jtd.codegen.
- Unit tests + sample schema.
- Nightly GitHub Actions workflow building jar + GraalVM native binaries for linux/windows/macos (amd64/arm64).
Goal
Add an experimental CLI that reads a JTD schema (RFC 8927) and generates an ES2020 ESM validator exporting
validate()for browserBroadcastChannelpayload validation.Scope (deliberately limited)
Support only:
propertiesoptionalPropertiestypeprimitivesenummetadata.idReject the rest (
elements,values,discriminator/mapping,ref/definitions, nestedproperties) with:Unsupported JTD feature: <feature>. This experimental tool only supports flat schemas with properties, optionalProperties, type, and enum.Deliverables
jtd-esm-codegenuber-jar (CLI entry point).io.github.simbo1905.json.jtd.codegen.