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 (*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)
Click to show internal directories.
Click to hide internal directories.