jsonschema

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Property

type Property struct {
	Type        string              `json:"type,omitempty"`
	Description string              `json:"description,omitempty"`
	Enum        []any               `json:"enum,omitempty"`
	Properties  map[string]Property `json:"properties,omitempty"`
	Items       *Property           `json:"items,omitempty"`
}

Property represents a single JSON Schema property definition.

type Schema

type Schema struct {
	Type        string              `json:"type,omitempty"`
	Description string              `json:"description,omitempty"`
	Properties  map[string]Property `json:"properties,omitempty"`
	Required    []string            `json:"required,omitempty"`
	Items       *Property           `json:"items,omitempty"`
}

Schema is a minimal JSON Schema (draft-07 compatible) used throughout ToolTrust Scanner.

func (Schema) HasProperty

func (s Schema) HasProperty(name string) bool

HasProperty reports whether the schema contains a property with the given name.

func (Schema) PropertyNames

func (s Schema) PropertyNames() []string

PropertyNames returns the sorted list of property keys defined in the schema.

Jump to

Keyboard shortcuts

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