resolver

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver interface {
	// Resolve resolves the given type into a schema.
	Resolve(typeName string, opts ...options.SchemaOption) (*openapi.RefOrSpec[openapi.Schema], error)

	// From returns a new resolver re-positioned to the given file.
	From(file *ast.File, from string) Resolver
}

Resolves types into a schema.

func NewResolver

func NewResolver(
	validatorRegistry validator.Registry,
	typeDefCache cache.TypeDefCache,
	definitionsCache cache.DefinitionsCache,
	builderFactory SchemaBuilderFactory,
	file *ast.File,
	from string,
) Resolver

NewResolver creates a new resolver.

type SchemaBuilder

type SchemaBuilder interface {
	Build(expr ast.Expr, opts ...options.SchemaOption) (*openapi.RefOrSpec[openapi.Schema], error)
}

func NewSchemaBuilder

func NewSchemaBuilder(
	validatorRegistry validator.Registry,
	resolver Resolver,
	aliases map[string]string,
) SchemaBuilder

type SchemaBuilderFactory

type SchemaBuilderFactory func(
	validatorRegistry validator.Registry,
	resolver Resolver,
	aliases map[string]string,
) SchemaBuilder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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