Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 Changes in this version + func NewUIHandler(title, specURL, basePath string, renderer UIRenderer) http.Handler + type APIKey struct + In APIKeyIn + Name string + type APIKeyIn string + const APIKeyInCookie + const APIKeyInHeader + const APIKeyInQuery + type Collector struct + func NewCollector(ref Reflector, cfg SpecConfig) (*Collector, error) + func (c *Collector) AnnotateOperation(method, pattern string, fn func(oc OperationContext) error) + func (c *Collector) CollectOperation(method, pattern string, handler http.Handler, ...) error + func (c *Collector) ServeHTTP(w http.ResponseWriter, _ *http.Request) + func (c *Collector) SkipPath(path string) + func (c *Collector) SpecConfig() SpecConfig + type ErrorBody struct + Error string + Status int + type ExternalDocsInfo struct + Description string + URL string + type HTTPBasic struct + type HTTPBearer struct + BearerFormat string + type MutualTLS struct + type OAuth2 struct + AuthorizationCode *OAuth2AuthorizationCodeFlow + ClientCredentials *OAuth2ClientCredentialsFlow + Implicit *OAuth2ImplicitFlow + Password *OAuth2PasswordFlow + type OAuth2AuthorizationCodeFlow struct + AuthorizationURL string + Scopes map[string]string + TokenURL string + type OAuth2ClientCredentialsFlow struct + Scopes map[string]string + TokenURL string + type OAuth2ImplicitFlow struct + AuthorizationURL string + Scopes map[string]string + type OAuth2PasswordFlow struct + Scopes map[string]string + TokenURL string + type OIDC struct + DiscoveryURL string + type OpOpt func(OperationContext) error + func Deprecated() OpOpt + func Description(s string) OpOpt + func Errors(statuses ...int) OpOpt + func ExternalDocs(url, description string) OpOpt + func NoSecurity() OpOpt + func OperationID(id string) OpOpt + func Raw(fn func(oc OperationContext) error) OpOpt + func RequestExample(name string, example any) OpOpt + func Response(status int, body any) OpOpt + func ResponseExample(status int, name string, example any) OpOpt + func Security(schemeNames ...string) OpOpt + func Summary(s string) OpOpt + func Tags(tags ...string) OpOpt + type OperationContext interface + AddExternalDocs func(url, description string) + AddRequest func(body any) + AddRequestExample func(name string, example any) + AddResponse func(status int, body any) + AddResponseExample func(status int, name string, example any) + SetDeprecated func(b bool) + SetDescription func(s string) + SetOperationID func(id string) + SetSecurity func(schemes ...string) + SetSummary func(s string) + SetTags func(tags ...string) + type Preparer interface + SetupOperation func(oc OperationContext) error + type Reflector interface + AddOperation func(oc OperationContext) error + ApplySpecConfig func(cfg SpecConfig) error + NewOperationContext func(method, pattern string) (OperationContext, error) + SpecJSON func() ([]byte, error) + func NewReflector() Reflector + type SecurityScheme interface + func APIKeyCookie(cookieName string) SecurityScheme + func APIKeyHeader(headerName string) SecurityScheme + func APIKeyQuery(paramName string) SecurityScheme + func BasicAuth() SecurityScheme + func BearerJWT() SecurityScheme + func BearerToken(format string) SecurityScheme + func MutualTLSScheme() SecurityScheme + func OAuth2AuthorizationCode(authURL, tokenURL string, scopes map[string]string) SecurityScheme + func OAuth2ClientCredentials(tokenURL string, scopes map[string]string) SecurityScheme + func OAuth2Implicit(authURL string, scopes map[string]string) SecurityScheme + func OAuth2Password(tokenURL string, scopes map[string]string) SecurityScheme + func OIDCScheme(discoveryURL string) SecurityScheme + type SpecConfig struct + DefaultSecurity []string + Description string + ExternalDocs *ExternalDocsInfo + SecuritySchemes map[string]SecurityScheme + Servers []SpecServer + SpecPath string + Tags []SpecTagInfo + Title string + UIPath string + UIRenderer UIRenderer + Version string + func (c *SpecConfig) ApplyDefaults() + type SpecOpt func(*SpecConfig) + func DefaultSecurity(schemeNames ...string) SpecOpt + func Server(url, description string) SpecOpt + func SpecDescription(s string) SpecOpt + func SpecExternalDocs(url, description string) SpecOpt + func SpecPath(p string) SpecOpt + func SpecSecurityScheme(name string, scheme SecurityScheme) SpecOpt + func SpecTag(name, description string) SpecOpt + func SpecTitle(s string) SpecOpt + func SpecVersion(s string) SpecOpt + func UI(r UIRenderer) SpecOpt + func UIPath(p string) SpecOpt + type SpecServer struct + Description string + URL string + type SpecTagInfo struct + Description string + Name string + type UIRenderer string + const Redoc + const StoplightElements + const SwaggerUI