Documentation ¶
Overview ¶
Package oas represents OpenAPI v3 Specification in Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Example ¶ added in v0.10.1
type Example struct { Ref string `json:"$ref,omitempty"` // ref object Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` Value json.RawMessage `json:"value,omitempty"` ExternalValue string `json:"externalValue,omitempty"` }
Example is an OpenAPI Example.
type Operation ¶
type Operation struct { OperationID string // optional Description string // optional HTTPMethod string Path Path Parameters []*Parameter RequestBody *RequestBody // optional // Operation responses. // Map is always non-nil. // // Key can be: // * HTTP Status code // * default // * 1XX, 2XX, 3XX, 4XX, 5XX Responses map[string]*Response }
Operation is an OpenAPI Operation.
type Parameter ¶
type Parameter struct { Name string Description string Schema *jsonschema.Schema In ParameterLocation Style ParameterStyle Explode bool Required bool }
Parameter is an OpenAPI Operation Parameter.
type ParameterLocation ¶
type ParameterLocation string
ParameterLocation defines where OpenAPI parameter is located.
const ( LocationQuery ParameterLocation = "query" LocationHeader ParameterLocation = "header" LocationPath ParameterLocation = "path" LocationCookie ParameterLocation = "cookie" )
func (ParameterLocation) Cookie ¶
func (l ParameterLocation) Cookie() bool
func (ParameterLocation) Header ¶
func (l ParameterLocation) Header() bool
func (ParameterLocation) Path ¶
func (l ParameterLocation) Path() bool
func (ParameterLocation) Query ¶
func (l ParameterLocation) Query() bool
type ParameterStyle ¶ added in v0.10.0
type ParameterStyle string
const ( PathStyleSimple ParameterStyle = "simple" PathStyleLabel ParameterStyle = "label" PathStyleMatrix ParameterStyle = "matrix" QueryStyleForm ParameterStyle = "form" QueryStyleSpaceDelimited ParameterStyle = "spaceDelimited" QueryStylePipeDelimited ParameterStyle = "pipeDelimited" QueryStyleDeepObject ParameterStyle = "deepObject" HeaderStyleSimple ParameterStyle = "simple" CookieStyleForm ParameterStyle = "form" )
func (ParameterStyle) String ¶ added in v0.10.0
func (s ParameterStyle) String() string
type RequestBody ¶
type RequestBody struct { Contents map[string]*jsonschema.Schema Required bool }
RequestBody of an OpenAPI Operation.
Click to show internal directories.
Click to hide internal directories.