swagger

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDownloader added in v3.6.0

func NewDownloader() formats.SpecDownloader

NewDownloader creates a new Swagger downloader

Types

type SwaggerDownloader added in v3.6.0

type SwaggerDownloader struct{}

SwaggerDownloader implements the SpecDownloader interface for Swagger 2.0 specs

func (*SwaggerDownloader) Download added in v3.6.0

func (d *SwaggerDownloader) Download(urlStr, tmpDir string, httpClient *retryablehttp.Client) (string, error)

This function downloads a Swagger 2.0 spec from the given URL and saves it to tmpDir

func (*SwaggerDownloader) SupportedExtensions added in v3.6.0

func (d *SwaggerDownloader) SupportedExtensions() []string

SupportedExtensions returns the list of supported file extensions for Swagger

type SwaggerFormat

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

SwaggerFormat is a Swagger Schema File parser

func New

func New() *SwaggerFormat

New creates a new Swagger format parser

func (*SwaggerFormat) Name

func (j *SwaggerFormat) Name() string

Name returns the name of the format

func (*SwaggerFormat) Parse

func (j *SwaggerFormat) Parse(input io.Reader, resultsCb formats.ParseReqRespCallback, filePath string) error

Parse parses the input and calls the provided callback function for each RawRequest it discovers.

func (*SwaggerFormat) SetOptions

func (j *SwaggerFormat) SetOptions(options formats.InputFormatOptions)

Jump to

Keyboard shortcuts

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