Documentation
¶
Index ¶
Constants ¶
View Source
const ( OAS2 = "2.0" OAS3 = "3.0" ContentType = "application/json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type OpenAPI ¶
type OpenAPI struct {
// oas 2.0 has swagger in the root.k
Swagger string `json:"swagger,omitempty"`
Openapi string `json:"openapi,omitempty"`
Servers []Server `json:"servers,omitempty"`
Info Info `json:"info"`
Paths map[string]PathItem `json:"paths"`
Components Components `json:"components,omitempty"`
// oas 2.0 has definitions in the root.
Definitions map[string]Schema `json:"definitions,omitempty"`
}
func FetchOpenAPI ¶
func (*OpenAPI) DereferenceSchema ¶
func (*OpenAPI) GetSchemaFromResponse ¶
func (*OpenAPI) OASVersion ¶
type RequestBody ¶
type Schema ¶
type Schema struct {
Type string `json:"type"`
Format string `json:"format,omitempty"`
Items *Schema `json:"items,omitempty"`
Properties map[string]Schema `json:"properties,omitempty"`
Ref string `json:"$ref,omitempty"`
XAEPResource *XAEPResource `json:"x-aep-resource,omitempty"`
ReadOnly bool `json:"readOnly,omitempty"`
Required []string `json:"required,omitempty"`
}
type Server ¶
type Server struct {
URL string `json:"url"`
Description string `json:"description,omitempty"`
Variables map[string]ServerVariable `json:"variables,omitempty"`
}
type ServerVariable ¶
Click to show internal directories.
Click to hide internal directories.