Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Header ¶
type Header Parameter
Header : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#header-object
type Info ¶
type Info struct { Method string `json:"method"` URL string `json:"url"` HTTPVersion string `json:"httpVersion,omitempty"` HeaderSize int64 `json:"headerSize,omitempty" default:"-1"` BodySize int64 `json:"bodySize,omitempty" default:"-1"` ContentType string `json:"contentType"` Paths Paths `json:"paths"` }
func (*Info) HandleError ¶
func (info *Info) HandleError(open func() (io.WriteCloser, error), err error)
TODO
type MediaType ¶
type MediaType struct { // Schema Schema Example interface{} `json:"example,omitempty"` Examples []interface{} `json:"examples,omitempty"` }
MediaType : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#request-body-object
type Operation ¶
type Operation struct { // Tags string // Summary string // Description string // ExternalDocs ExternalDocumentation // OperationID string Parameters []Parameter `json:"parameters,omitempty"` RequestBody *RequestBody `json:"requestBody,omitempty"` Responses []Response `json:"responses,omitempty"` }
Operation : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operation-object
type Parameter ¶
type Parameter struct { Name string `json:"name"` In string `json:"in"` // query,header,path,cookie // Description string // Required bool // Deprecated bool // AllowEmptyValue bool // Style string // Explode bool // AllowReserved bool // Schema Schema Example interface{} `json:"example,omitempty"` Examples []interface{} `json:"examples,omitempty"` // cookies, headers }
Parameter : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameter-object
type PathItem ¶
type PathItem struct { // Ref string // Summary string // Description string Get *Operation `json:"get,omitempty"` Put *Operation `json:"put,omitempty"` Post *Operation `json:"post,omitempty"` Delete *Operation `json:"delete,omitempty"` Options *Operation `json:"options,omitempty"` Head *Operation `json:"head,omitempty"` Patch *Operation `json:"patch,omitempty"` Trace *Operation `json:"trace,omitempty"` }
PathItem : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#paths-object
type Paths ¶
Paths : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#paths-object
type RequestBody ¶
type RequestBody struct { // Description string `json:"description"` Content map[string]MediaType `json:"content"` }
RequestBody : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#request-body-object
type Response ¶
type Response struct { // Description string Headers map[string]Header `json:"headers"` Content map[string]MediaType `json:"content"` }
Response : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#response-object