Documentation ¶
Overview ¶
Package load loads OpenAPI specs from different sources like URLs, paths, globs and stdin Optionally, specs can be preprocessed after loading
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶ added in v0.0.8
type Loader interface { LoadFromURI(*url.URL) (*openapi3.T, error) LoadFromFile(string) (*openapi3.T, error) LoadFromStdin() (*openapi3.T, error) }
Loader interface includes the OAS load functions
type Option ¶ added in v1.10.6
option functions can be used to preprocess specs after loading them
func WithFlattenAllOf ¶ added in v1.10.6
func WithFlattenAllOf() Option
WithFlattenAllOf returns SpecInfos with flattened allOf
func WithFlattenParams ¶ added in v1.10.6
func WithFlattenParams() Option
WithFlattenParams returns SpecInfos with Common Parameters combined into operation parameters See here for Common Parameters definition: https://swagger.io/docs/specification/describing-parameters/
func WithIdentity ¶ added in v1.10.6
func WithIdentity() Option
WithIdentity returns the original SpecInfos
func WithLowercaseHeaders ¶ added in v1.10.8
func WithLowercaseHeaders() Option
WithLowercaseHeaders returns SpecInfos with header names converted to lowercase
type SourceType ¶ added in v1.10.3
type SourceType int
const ( SourceTypeStdin SourceType = iota SourceTypeURL SourceTypeFile )
type SpecInfo ¶ added in v1.5.17
SpecInfo contains information about an OpenAPI spec and its metadata
func NewSpecInfo ¶ added in v1.10.6
NewSpecInfo creates a SpecInfo from a local file path, a URL, or stdin
func NewSpecInfoFromGlob ¶ added in v1.10.6
NewSpecInfoFromGlob creates SpecInfos from local files matching the specified glob parameter
func (*SpecInfo) GetVersion ¶ added in v1.9.6
type SpecInfoPair ¶ added in v1.9.6
func NewSpecInfoPair ¶ added in v1.9.6
func NewSpecInfoPair(specInfo1, specInfo2 *SpecInfo) *SpecInfoPair
func (*SpecInfoPair) GetBaseVersion ¶ added in v1.9.6
func (specInfoPair *SpecInfoPair) GetBaseVersion() string
func (*SpecInfoPair) GetRevisionVersion ¶ added in v1.9.6
func (specInfoPair *SpecInfoPair) GetRevisionVersion() string