jsonschema

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const LanguageRef = "jsonschema"

Variables

This section is empty.

Functions

func ValidateSchemas

func ValidateSchemas(file codejen.File) (codejen.File, error)

Types

type Config

type Config struct {
	Debug bool `yaml:"-"`

	Compact bool `yaml:"compact"`
}

func (Config) MergeWithGlobal

func (config Config) MergeWithGlobal(global languages.Config) Config

type Definition

type Definition = *orderedmap.Map[string, any]

type Language

type Language struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *Language

func (*Language) CompilerPasses

func (language *Language) CompilerPasses() compiler.Passes

func (*Language) Jennies

func (language *Language) Jennies(globalConfig languages.Config) *codejen.JennyList[languages.Context]

func (*Language) Name

func (language *Language) Name() string

type Schema

type Schema struct {
	Config             Config
	ReferenceFormatter func(ref ast.RefType) string
	// contains filtered or unexported fields
}

func (Schema) Generate

func (jenny Schema) Generate(context languages.Context) (codejen.Files, error)

func (Schema) GenerateSchema

func (jenny Schema) GenerateSchema(context languages.Context, schema *ast.Schema) Definition

func (Schema) JennyName

func (jenny Schema) JennyName() string

Jump to

Keyboard shortcuts

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