openapi

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpSchemeType          string = "http"
	OAuth2SchemeType        string = "oauth2"
	OpenIdConnectSchemeType string = "openidconnect"
	ApiKeySchemeType        string = "apikey"

	// BasicScheme  string = "basic"
	BearerScheme string = "bearer"
)

Variables

This section is empty.

Functions

func GetOperationPath added in v0.8.2

func GetOperationPath(p string, params openapi3.Parameters) (string, error)

func NewErrUnsupportedBearerFormat

func NewErrUnsupportedBearerFormat(bearerFormat string) error

func NewErrUnsupportedScheme

func NewErrUnsupportedScheme(scheme string) error

func NewErrUnsupportedSecuritySchemeType

func NewErrUnsupportedSecuritySchemeType(schemeType string) error

Types

type OpenAPI

type OpenAPI struct {
	Doc *openapi3.T
	// contains filtered or unexported fields
}

func LoadFromData

func LoadFromData(ctx context.Context, data []byte) (*OpenAPI, error)

func LoadOpenAPI

func LoadOpenAPI(ctx context.Context, urlOrPath string) (*OpenAPI, error)

func NewOpenAPI

func NewOpenAPI(doc *openapi3.T) *OpenAPI

func (*OpenAPI) BaseUrl

func (openapi *OpenAPI) BaseUrl() *url.URL

func (*OpenAPI) Operations

func (openapi *OpenAPI) Operations(client *request.Client, securitySchemes auth.SecuritySchemesMap) (request.Operations, error)

func (*OpenAPI) SecuritySchemeMap

func (openapi *OpenAPI) SecuritySchemeMap(values *auth.SecuritySchemeValues) (auth.SecuritySchemesMap, error)

func (*OpenAPI) SetBaseUrl added in v0.7.1

func (openapi *OpenAPI) SetBaseUrl(baseUrl *url.URL) *OpenAPI

func (*OpenAPI) Validate

func (openapi *OpenAPI) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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