Versions in this module Expand all Collapse all v0 v0.2.1 May 2, 2026 v0.2.0 Apr 29, 2026 Changes in this version + func OpenAPIHandler(docs *Docs) http.HandlerFunc + func RegisterExporter(name string, exporter Exporter) + func SwaggerUIHandler(openAPIURL string) http.HandlerFunc + type API struct + Description string + Title string + Version string + type Components struct + Schemas map[string]*Schema + SecuritySchemes map[string]SecurityScheme + type DataType string + const Bool + const Float + const Int + const String + type Docs struct + func New(info API) *Docs + func (docs *Docs) API() API + func (docs *Docs) AddSecurityScheme(name string, scheme SecurityScheme) + func (docs *Docs) Register(method string, path string, opts ...RouteOption) Route + func (docs *Docs) Routes() []Route + func (docs *Docs) SecuritySchemes() map[string]SecurityScheme + type Exporter interface + Handler func(openAPIURL string) http.HandlerFunc + func ExporterByName(name string) (Exporter, error) + type MediaType struct + Example interface{} + Schema *Schema + type OpenAPI struct + Components *Components + Info API + OpenAPI string + Paths map[string]map[string]Operation + func GenerateOpenAPI(docs *Docs) OpenAPI + type OpenAPIHeader struct + Description string + Schema *Schema + type OpenAPIParameter struct + Description string + In string + Name string + Required bool + Schema *Schema + type Operation struct + Description string + OperationID string + Parameters []OpenAPIParameter + RequestBody *RequestBodyObject + Responses map[string]ResponseObject + Security []map[string][]string + Summary string + Tags []string + type Parameter struct + Description string + In string + Name string + Required bool + Schema *Schema + Type DataType + type RequestBodyObject struct + Content map[string]MediaType + Required bool + type ResponseHeaderInfo struct + Description string + Name string + Schema *Schema + Type DataType + func ResponseHeader(name string, typ DataType, description string) ResponseHeaderInfo + type ResponseObject struct + Content map[string]MediaType + Description string + Headers map[string]OpenAPIHeader + type Route struct + Body interface{} + BodyExample interface{} + BodySchema *Schema + Description string + Method string + OperationID string + Parameters []Parameter + Path string + Responses []RouteResponse + Security []string + Summary string + Tags []string + type RouteOption func(*Route) + func Body(body interface{}) RouteOption + func BodySchema(schema *Schema) RouteOption + func BodyWithExample(body interface{}, example interface{}) RouteOption + func Description(description string) RouteOption + func Header(name string, typ DataType, required bool) RouteOption + func HeaderWithDescription(name string, typ DataType, required bool, description string) RouteOption + func OperationID(id string) RouteOption + func Path(name string, typ DataType, required bool) RouteOption + func PathWithDescription(name string, typ DataType, required bool, description string) RouteOption + func Query(name string, typ DataType, required bool) RouteOption + func QueryWithDescription(name string, typ DataType, required bool, description string) RouteOption + func Responds(status int, body interface{}) RouteOption + func ResponseSchema(status int, description string, schema *Schema) RouteOption + func ResponseWithDescription(status int, description string, body interface{}) RouteOption + func ResponseWithDescriptionAndExample(status int, description string, body interface{}, example interface{}, ...) RouteOption + func Security(name string) RouteOption + func Status(status int, body interface{}) RouteOption + func StatusWithExample(status int, body interface{}, example interface{}, ...) RouteOption + func StatusWithHeaders(status int, body interface{}, headers ...ResponseHeaderInfo) RouteOption + func Summary(summary string) RouteOption + func Tags(tags ...string) RouteOption + type RouteResponse struct + Body interface{} + Description string + Example interface{} + Headers []ResponseHeaderInfo + Schema *Schema + Status int + type Router interface + Handle func(method string, path string, handler http.HandlerFunc, opts ...RouteOption) + func NewRouter(docs *Docs) Router + type Schema struct + AdditionalProperties *Schema + Description string + Enum []interface{} + Example interface{} + Format string + Items *Schema + Nullable bool + Properties map[string]*Schema + Ref string + Required []string + Type string + func SchemaFromType(value interface{}) *Schema + type SecurityScheme struct + BearerFormat string + In string + Name string + Scheme string + Type string + func APIKeySecurity(name string, in string) SecurityScheme + func BasicSecurity() SecurityScheme + func BearerSecurity(format string) SecurityScheme