load

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package load provides a function to load an OpenAPI spec from a URL or a Path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From added in v0.2.5

func From(loader Loader, path string) (*openapi3.T, error)

From is a convenience function that opens an OpenAPI spec from a URL or a local path based on the format of the path parameter

Types

type Loader added in v0.0.8

type Loader interface {
	LoadFromURI(*url.URL) (*openapi3.T, error)
	LoadFromFile(string) (*openapi3.T, error)
}

Loader interface includes the OAS load functions

type SpecInfo added in v1.5.17

type SpecInfo struct {
	Url  string
	Spec *openapi3.T
}

func FromGlob added in v1.3.0

func FromGlob(loader Loader, glob string) ([]SpecInfo, error)

FromGlob creates SpecInfo specs from local files matching the specified glob parameter

func LoadSpecInfo added in v1.5.17

func LoadSpecInfo(loader Loader, location string) (*SpecInfo, error)

LoadSpecInfo creates a SpecInfo from a local file path or a URL

func LoadSpecInfoFromFile added in v1.5.17

func LoadSpecInfoFromFile(loader Loader, location string) (*SpecInfo, error)

LoadSpecInfoFromFile creates a SpecInfo from a local file path

Jump to

Keyboard shortcuts

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