openapi

package
v3.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DEFAULT_HTTP_SCHEME_HEADER = "Authorization"
)

Variables

View Source
var (
	// ErrRecursive is when a schema is impossible to represent because it infinitely recurses.
	ErrRecursive = errors.New("Recursive schema")

	// ErrNoExample is sent when no example was found for an operation.
	ErrNoExample = errors.New("No example found")
)

Functions

func GenerateParameterFromSecurityScheme

func GenerateParameterFromSecurityScheme(scheme *openapi3.SecuritySchemeRef) (*openapi3.Parameter, error)

GenerateParameterFromSecurityScheme generates an example from a schema object

func GenerateRequestsFromSchema

func GenerateRequestsFromSchema(schema *openapi3.T, opts formats.InputFormatOptions, callback formats.ParseReqRespCallback) error

GenerateRequestsFromSchema generates http requests from an OpenAPI 3.0 document object

func GetGlobalParamsForSecurityRequirement

func GetGlobalParamsForSecurityRequirement(schema *openapi3.T, requirement *openapi3.SecurityRequirements) ([]*openapi3.ParameterRef, error)

GetGlobalParamsForSecurityRequirement returns the global parameters for a security requirement

Types

type OpenAPIFormat

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

OpenAPIFormat is a OpenAPI Schema File parser

func New

func New() *OpenAPIFormat

New creates a new OpenAPI format parser

func (*OpenAPIFormat) Name

func (j *OpenAPIFormat) Name() string

Name returns the name of the format

func (*OpenAPIFormat) Parse

func (j *OpenAPIFormat) Parse(input string, resultsCb formats.ParseReqRespCallback) error

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

func (*OpenAPIFormat) SetOptions

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

Jump to

Keyboard shortcuts

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