schema

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package schema provides JSON Schema generation from Go types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate[T any]() map[string]any

Generate generates a JSON Schema from a Go type using reflection. Supports structs, slices, maps, and primitive types.

Example:

type Response struct {
    Name  string   `json:"name"`
    Count int      `json:"count"`
    Tags  []string `json:"tags"`
}
schema := schema.Generate[Response]()

Types

This section is empty.

Jump to

Keyboard shortcuts

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