openapi

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UUID  = "uuid"
	URL   = "url"
	EMAIL = "email"
)
View Source
const BasicAuthHeaderName string = "Authorization"

Variables

This section is empty.

Functions

This section is empty.

Types

type ParameterType

type ParameterType string
const (
	Query    ParameterType = "query"
	Path     ParameterType = "path"
	Header   ParameterType = "header"
	Body     ParameterType = "body"
	FormData ParameterType = "formData"
)

func (ParameterType) String

func (p ParameterType) String() string

type SecurityType

type SecurityType string
const (
	Basic  SecurityType = "basic"
	ApiKey SecurityType = "apiKey"
)

func (SecurityType) String

func (s SecurityType) String() string

type Spec

type Spec struct {
	Spec *spec.Swagger
	// contains filtered or unexported fields
}

func NewOpenApiSpecFromFile

func NewOpenApiSpecFromFile(path string) (*Spec, error)

func (*Spec) Definitions

func (oas *Spec) Definitions() spec.Definitions

func (*Spec) GlobalConsumes

func (oas *Spec) GlobalConsumes() []string

A list of MIME types the APIs on this resource can consume. This is global to all APIs but can be overridden on specific API calls.

func (*Spec) GlobalProduces

func (oas *Spec) GlobalProduces() []string
	A list of MIME types the APIs on this resource can produce.
 This is global to all APIs but can be overridden on specific API calls.

func (*Spec) GlobalSecurities

func (oas *Spec) GlobalSecurities() []map[string][]string

func (*Spec) Info

func (oas *Spec) Info() *spec.InfoProps

func (*Spec) MarshalJSON

func (oas *Spec) MarshalJSON() ([]byte, error)

func (*Spec) Parameters

func (oas *Spec) Parameters() map[string]spec.Parameter

func (*Spec) Paths

func (oas *Spec) Paths() map[string]spec.PathItem

func (*Spec) SecurityScheme

func (oas *Spec) SecurityScheme(name string) *spec.SecurityScheme

func (*Spec) Validate

func (oas *Spec) Validate() error

Jump to

Keyboard shortcuts

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