Package schema
Go module github.com/bide-ai/bide; all packages.
github.com/bide-ai/bide/schema · pkg.go.dev · Stability: core
Package schema derives JSON Schema from Go types and emits provider-specific dialects.
Variables
var ErrGeminiUnsupported: ErrGeminiUnsupported reports a schema Gemini's schema subset cannot express without changing which documents it admits (a map, an unconstrained value, an object with no properties).var ErrStrictUnsupported: ErrStrictUnsupported reports a schema OpenAIStrict cannot express in strict mode without changing which documents it admits (a map, a recursive type, a free-form object).var ErrUnsupportedType: ErrUnsupportedType reports a Go type For cannot describe: a document valid under any schema for it would fail to decode, so For refuses the type rather than emit such a schema.
Functions
func For[T any]() (json.RawMessage, error): For derives an inline JSON Schema from Go type T.func Gemini(neutral json.RawMessage) (json.RawMessage, error): Gemini transforms a neutral schema into the OpenAPI 3.0 subset Gemini reads in a function declaration's parameters and in responseSchema:func OpenAIStrict(neutral json.RawMessage) (json.RawMessage, error): OpenAIStrict transforms a neutral schema into OpenAI structured-output "strict" form, which closes every object (additionalProperties:false) and lists every property in required.