Skip to content

Examples

These examples focus on decisions you need to make. Every page links to compiling repository examples when you need the complete package and generated output.

Optional and nullable

Model an omitted property separately from a required property whose value may be null.

Enums

Generate string enums or expose meaningful names for integer constants.

Interfaces

Register implementations and generate a discriminated anyOf schema.

Shared definitions (AsRef)

Render a type once as a $ref into $defs instead of inlining it everywhere.

Provider schemas

Supply field schemas at runtime when static generation is not enough.

The repository also contains complete, executable packages under examples/.

For a compact source-generated reference, see the installable skill’s references/examples.md.