schema

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package schema embeds the generated JSON Schema for sessions.Session, the document "omnidevx sessions --json" prints, so tools can validate it without a copy of the Go types.

The schema is generated from the Go structs, which are the source of truth, and committed. Regenerate it after changing a type in the sessions package:

go generate ./sessions/schema

Check that the committed file is current, for example in CI, by regenerating it and failing on any difference. The generate directive below holds the id, title, and description, so a bare schemakit --check without them would report drift on a current file.

go generate ./sessions/schema && git diff --exit-code -- sessions/schema/session.schema.json

The tests in this package also compare the schema's properties and required fields to the Go structs, so most drift fails go test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Session

func Session() []byte

Session returns the JSON Schema (draft 2020-12) for sessions.Session. The caller may modify the returned slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL