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. Swagger string `json:"swagger,omitempty"` Info Info `json:"info"` OpenAPI string `json:"openapi,omitempty"` Servers []Server `json:"servers,omitempty"` 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) GetSchemaFromRequestBody ¶
func (o *OpenAPI) GetSchemaFromRequestBody(r RequestBody) *Schema
func (*OpenAPI) GetSchemaFromResponse ¶
func (*OpenAPI) OASVersion ¶
type Operation ¶
type Operation struct { Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` OperationID string `json:"operationId,omitempty"` Parameters []Parameter `json:"parameters,omitempty"` Responses map[string]Response `json:"responses,omitempty"` RequestBody *RequestBody `json:"requestBody,omitempty"` }
type Parameter ¶
type Parameter struct { Name string `json:"name,omitempty"` In string `json:"in,omitempty"` Description string `json:"description,omitempty"` Required bool `json:"required,omitempty"` Schema *Schema `json:"schema,omitempty"` Type string `json:"type,omitempty"` XAEPResourceRef *XAEPResourceRef `json:"x-aep-resource-reference,omitempty"` }
type Properties ¶
type RequestBody ¶
type Schema ¶
type Schema struct { Type string `json:"type,omitempty"` Format string `json:"format,omitempty"` Items *Schema `json:"items,omitempty"` Properties Properties `json:"properties,omitempty"` Ref string `json:"$ref,omitempty"` XAEPResource *XAEPResource `json:"x-aep-resource,omitempty"` XAEPFieldNumbers map[int]string `json:"x-aep-field-numbers,omitempty"` ReadOnly bool `json:"readOnly,omitempty"` Required []string `json:"required,omitempty"` Description string `json:"description,omitempty"` }
type Server ¶
type Server struct { URL string `json:"url"` Description string `json:"description,omitempty"` Variables map[string]ServerVariable `json:"variables,omitempty"` }
type ServerVariable ¶
type XAEPResource ¶
type XAEPResourceRef ¶
type XAEPResourceRef struct {
Resource string `json:"resource,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.