swagger

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupByTag    = "tag"
	GroupByMethod = "method"
	GroupByNone   = "none"
)

Variables

This section is empty.

Functions

func LoadSwaggerFile

func LoadSwaggerFile(ctx context.Context, filepath string) (*openapi3.T, error)

LoadSwaggerFile loads the Swagger/OpenAPI file into a parsed document.

func LocateSwaggerFile

func LocateSwaggerFile() string

LocateSwaggerFile tries to find the Swagger file in the current directory.

Types

type Components

type Components interface {
	ListComponents() error
	ViewComponent(name string) error
}

func NewComponents

func NewComponents(doc *openapi3.T) Components

type ConvertOptions

type ConvertOptions struct {
	Method   string
	Endpoint string
	ToType   string
}

type Endpoints

type Endpoints interface {
	ListEndpoints(options ListOptions) error
	ViewEndpoint(options ViewOptions) error
	ConvertEndpoint(options ConvertOptions) error
}

func NewEndpoints

func NewEndpoints(doc *openapi3.T) Endpoints

type ListOptions

type ListOptions struct {
	Method   string
	Endpoint string
	Tag      string
	Group    string
}

type Servers

type Servers interface {
	ListServers() error
}

func NewServers

func NewServers(doc *openapi3.T) Servers

type Tags

type Tags interface {
	ListTags() error
	ViewTag(name string) error
}

func NewTags

func NewTags(doc *openapi3.T) Tags

type ViewOptions

type ViewOptions struct {
	Method   string
	Endpoint string
}

Jump to

Keyboard shortcuts

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