Versions in this module Expand all Collapse all v0 v0.18.1 Jun 29, 2021 Changes in this version + type Components struct + Examples map[string]*ExampleOrRef + Headers map[string]*HeaderOrRef + Parameters map[string]*ParameterOrRef + Responses map[string]*ResponseOrRef + Schemas map[string]*SchemaOrRef + SecuritySchemes map[string]*SecuritySchemeOrRef + type Contact struct + Email string + Name string + URL string + type DataType interface + Format func() string + Type func() string + func DataTypeFromType(t reflect.Type) DataType + type Encoding struct + AllowReserved bool + ContentType string + Explode bool + Headers map[string]*HeaderOrRef + Style string + type Example struct + Description string + ExternalValue string + Summary string + Value interface{} + type ExampleOrRef struct + func (eor *ExampleOrRef) MarshalYAML() (interface{}, error) + type FieldError struct + Message string + Name string + ParameterLocation string + Parent reflect.Type + Type reflect.Type + TypeName string + func (fe *FieldError) Error() string + type Generator struct + func NewGenerator(conf *SpecGenConfig) (*Generator, error) + func (g *Generator) API() *OpenAPI + func (g *Generator) AddOperation(path, method, tag string, in, out reflect.Type, info *OperationInfo) (*Operation, error) + func (g *Generator) AddTag(name, desc string) + func (g *Generator) Errors() []error + func (g *Generator) OverrideDataType(t reflect.Type, typ, format string) error + func (g *Generator) OverrideTypeName(t reflect.Type, name string) error + func (g *Generator) SetInfo(info *Info) + func (g *Generator) SetSecurity(security *SecurityRequirement) + func (g *Generator) SetServers(servers []*Server) + func (g *Generator) SetSortParams(b bool) + func (g *Generator) SetSortTags(b bool) + func (g *Generator) UseFullSchemaNames(b bool) + type Header struct + AllowEmptyValue bool + Deprecated bool + Description string + Required bool + Schema *SchemaOrRef + type HeaderOrRef struct + func (hor *HeaderOrRef) MarshalYAML() (interface{}, error) + type Info struct + Contact *Contact + Description string + License *License + TermsOfService string + Title string + Version string + XLogo *XLogo + type InternalDataType int + const TypeAny + const TypeBinary + const TypeBoolean + const TypeByte + const TypeComplex + const TypeDate + const TypeDateTime + const TypeDouble + const TypeDuration + const TypeFloat + const TypeIP + const TypeInteger + const TypeLong + const TypePassword + const TypeString + const TypeURL + const TypeUUID + const TypeUnsupported + func (dt InternalDataType) Format() string + func (dt InternalDataType) String() string + func (dt InternalDataType) Type() string + type License struct + Name string + URL string + type MediaType struct + Encoding map[string]*Encoding + Example interface{} + Examples map[string]*ExampleOrRef + Schema *SchemaOrRef + type MediaTypeOrRef struct + func (mtor *MediaTypeOrRef) MarshalYAML() (interface{}, error) + type OAuthFlow struct + AuthorizationURL string + RefreshURL string + Scopes map[string]string + TokenURL string + type OAuthFlows struct + AuthorizationCode *OAuthFlow + ClientCredentials *OAuthFlow + Implicit *OAuthFlow + Password *OAuthFlow + type OpenAPI struct + Components *Components + Info *Info + OpenAPI string + Paths Paths + Security *SecurityRequirement + Servers []*Server + Tags []*Tag + XTagGroups []*XTagGroup + type Operation struct + Deprecated bool + Description string + ID string + Parameters []*ParameterOrRef + RequestBody *RequestBody + Responses Responses + Security []*SecurityRequirement + Servers []*Server + Summary string + Tags []string + XCodeSamples []*XCodeSample + func (o *Operation) MarshalJSON() ([]byte, error) + func (o *Operation) MarshalYAML() (interface{}, error) + type OperationInfo struct + Deprecated bool + Description string + Headers []*ResponseHeader + ID string + InputModel interface{} + Responses []*OperationResponse + Security []*SecurityRequirement + StatusCode int + StatusDescription string + Summary string + XCodeSamples []*XCodeSample + type OperationResponse struct + Code string + Description string + Example interface{} + Examples map[string]interface{} + Headers []*ResponseHeader + Model interface{} + type OverridedDataType struct + func (dt *OverridedDataType) Format() string + func (dt *OverridedDataType) Type() string + type Parameter struct + AllowEmptyValue bool + Deprecated bool + Description string + Explode bool + In string + Name string + Required bool + Schema *SchemaOrRef + Style string + type ParameterOrRef struct + func (por *ParameterOrRef) MarshalYAML() (interface{}, error) + type PathItem struct + DELETE *Operation + Description string + GET *Operation + HEAD *Operation + OPTIONS *Operation + PATCH *Operation + POST *Operation + PUT *Operation + Parameters []*ParameterOrRef + Ref string + Servers []*Server + Summary string + TRACE *Operation + type Paths map[string]*PathItem + type Reference struct + Ref string + type RequestBody struct + Content map[string]*MediaType + Description string + Required bool + type Response struct + Content map[string]*MediaTypeOrRef + Description string + Headers map[string]*HeaderOrRef + type ResponseHeader struct + Description string + Model interface{} + Name string + type ResponseOrRef struct + func (ror *ResponseOrRef) MarshalYAML() (interface{}, error) + type Responses map[string]*ResponseOrRef + type Schema struct + AdditionalProperties *SchemaOrRef + AllOf *SchemaOrRef + AnyOf *SchemaOrRef + Default interface{} + Deprecated bool + Description string + Enum []interface{} + Example interface{} + ExclusiveMaximum bool + ExclusiveMinimum bool + Format string + Items *SchemaOrRef + MaxItems int + MaxLength int + MaxProperties int + Maximum int + MinItems int + MinLength int + MinProperties int + Minimum int + MultipleOf int + Nullable bool + OneOf *SchemaOrRef + Pattern string + Properties map[string]*SchemaOrRef + Required []string + Title string + Type string + UniqueItems bool + type SchemaOrRef struct + func (sor *SchemaOrRef) MarshalYAML() (interface{}, error) + type SecurityRequirement map[string][]string + type SecurityScheme struct + BearerFormat string + Description string + Flows *OAuthFlows + In string + Name string + OpenIDConnectURL string + Scheme string + Type string + type SecuritySchemeOrRef struct + func (sor *SecuritySchemeOrRef) MarshalYAML() (interface{}, error) + type Server struct + Description string + URL string + Variables map[string]*ServerVariable + type ServerVariable struct + Default string + Description string + Enum []string + type SpecGenConfig struct + DefaultTag string + EnumTag string + HeaderLocationTag string + PathLocationTag string + QueryLocationTag string + ValidatorTag string + type Tag struct + Description string + Name string + type TypeError struct + Message string + Type reflect.Type + func (te *TypeError) Error() string + type Typer interface + TypeName func() string + type XCodeSample struct + Label string + Lang string + Source string + type XLogo struct + AltText string + BackgroundColor string + Href string + URL string + type XTagGroup struct + Name string + Tags []string