generator

package
v0.0.0-...-e84ac6a Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(rootDir string) error

func ResolveRef

func ResolveRef[T any](s *GeneratorState, ref openapi.Reference) (*T, error)

Types

type GeneratorState

type GeneratorState struct {
	RootDir       string
	OutFiles      map[string]struct{}
	Specs         map[string]*openapi.Document
	DepsBase      map[string]map[string]struct{}
	DepsForImport map[string][]string
	DepsForLoader map[string][]string
	CurSpec       string
}

func (*GeneratorState) CreateFile

func (s *GeneratorState) CreateFile(paths ...string) (io.WriteCloser, error)

func (*GeneratorState) CreateFileName

func (s *GeneratorState) CreateFileName(paths ...string) (string, error)

func (*GeneratorState) GenerateConfig

func (s *GeneratorState) GenerateConfig(spec string) error

func (*GeneratorState) GenerateEmbed

func (s *GeneratorState) GenerateEmbed() error

func (*GeneratorState) GenerateLoader

func (s *GeneratorState) GenerateLoader(spec string) (err error)

func (*GeneratorState) GenerateLoaderTest

func (s *GeneratorState) GenerateLoaderTest() error

func (*GeneratorState) GeneratePkgMap

func (s *GeneratorState) GeneratePkgMap() error

func (*GeneratorState) LoadSpec

func (s *GeneratorState) LoadSpec(spec string) error

func (*GeneratorState) MakeDepsForLoader

func (s *GeneratorState) MakeDepsForLoader() error

func (*GeneratorState) MoveSchemas

func (s *GeneratorState) MoveSchemas() error

func (*GeneratorState) RemoveOldFiles

func (s *GeneratorState) RemoveOldFiles() error

func (*GeneratorState) RewriteSpecs

func (s *GeneratorState) RewriteSpecs() error

func (*GeneratorState) RewriteYamlAndGenerateConfig

func (s *GeneratorState) RewriteYamlAndGenerateConfig() error

func (*GeneratorState) WriteSpec

func (s *GeneratorState) WriteSpec(spec string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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