jsonschema

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package jsonschema contains JSON Schema helpers shared by Genkit provider plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnforceStrict

func EnforceStrict(schema map[string]any) map[string]any

EnforceStrict returns a deep copy of schema with additionalProperties: false set on every object subschema, recursing through "properties" and "items". This is the shape OpenAI and Anthropic require for strict tool schemas.

The input is not mutated. If the schema is not JSON-marshalable, the original map is returned unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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