Versions in this module Expand all Collapse all v0 v0.9.3 Apr 3, 2022 v0.9.2 Apr 3, 2022 Changes in this version + func ExampleToResponse(data interface{}) interface + type Components struct + RequestBodies RequestBodies + Schemas Schemas + type Content map[string]*MediaType + type Example struct + Value interface{} + type Examples map[string]Example + func (e Examples) GetKeys() []string + type Info struct + Description string + Title string + Version string + type MediaType struct + Example interface{} + Examples Examples + Schema Schema + func (mt MediaType) ResponseByExample() interface{} + func (mt MediaType) ResponseByExamplesKey(key string) interface{} + type OpenAPI struct + Components Components + Info Info + OpenAPI string + Paths Paths + Security []Security + Servers Servers + Tags Tags + func Parse(data []byte) (OpenAPI, error) + func (api OpenAPI) LookupRequestBodyByReference(ref string) (RequestBody, error) + func (api OpenAPI) LookupSchemaByReference(ref string) (Schema, error) + type Operation struct + Parameters Parameters + RequestBody RequestBody + Responses Responses + type Parameter struct + In string + Name string + Required bool + Schema *Schema + type Parameters []Parameter + type Path struct + Delete *Operation + Get *Operation + Patch *Operation + Post *Operation + Put *Operation + type Paths map[string]*Path + type RequestBodies map[string]*RequestBody + type RequestBody struct + Content Content + Description string + Ref string + Required bool + func (body RequestBody) IsRef() bool + type RequestBodyError struct + Ref string + func (e *RequestBodyError) Error() string + type Response struct + Content Content + Description *string + type Responses map[string]*Response + type Schema struct + Default interface{} + Example interface{} + Faker string + Format string + Items *Schema + MaxItems string + MinItems string + Properties Schemas + Ref string + Required []string + Type string + func (s Schema) IsRef() bool + func (s Schema) ResponseByExample(schemaContext SchemaContext) (interface{}, error) + type SchemaContext interface + LookupSchemaByReference func(ref string) (Schema, error) + type SchemaError struct + Ref string + func (e *SchemaError) Error() string + type Schemas map[string]*Schema + type Security map[string][]string + type Server struct + Description string + URL string + type Servers []*Server + type Tag struct + Description string + Name string + type Tags []*Tag