schema

package
v1.41.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomGenerators = &customSchema{
	mapSchema: make(map[string]CustomGenerator),
}

Functions

func GetFieldName

func GetFieldName(fieldType reflect.StructField) (string, bool)

func GetNameAndRequiredFlag

func GetNameAndRequiredFlag(field reflect.StructField) (string, bool)

func SetProperties

func SetProperties(field reflect.StructField, s *jsonschema.Schema)

Types

type CustomGenerator

type CustomGenerator func(field reflect.StructField, s *jsonschema.Schema)

type Generator

type Generator struct {
	Reflector *jsonschema.Reflector
}

func NewGenerator

func NewGenerator() *Generator

func (*Generator) Generate

func (g *Generator) Generate(obj any) Schema

type Schema

type Schema *jsonschema.Schema

Jump to

Keyboard shortcuts

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