internal

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFile

func GenerateFile(paths []Path, c Cfg) (*jen.File, error)

GenerateFile generates the file based on the paths.

Types

type Cfg

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

func DefaultConfig

func DefaultConfig() Cfg

func (Cfg) Output

func (c Cfg) Output() string

func (Cfg) PackageName

func (c Cfg) PackageName() string

func (Cfg) SetOutput

func (c Cfg) SetOutput(output string) Cfg

func (Cfg) SetPackageName

func (c Cfg) SetPackageName(name string) Cfg

type Path

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

func NewPath

func NewPath(url string, item *v3.PathItem) Path

func (Path) AddEndpointStruct

func (p Path) AddEndpointStruct(f *jen.File) string

AddEndpointStruct add the endpoint struct to the generated file.

func (Path) GetURL added in v0.0.2

func (p Path) GetURL() string

func (Path) IsValid

func (p Path) IsValid() bool

IsValid returns whether the path is valid to be generated in the Path structs. The requirements are: - Get endpoint. - OperationId is filled.

Jump to

Keyboard shortcuts

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