Versions in this module Expand all Collapse all v0 v0.24.0 Jun 24, 2026 v0.23.0 Jun 24, 2026 Changes in this version + func NormalizePath(path string) string + func PathParams(path string) []string + func Register[T any](r *Registry) string + func SwaggerHTML(title, specURL string) string + type Body struct + Description string + MediaType string + Required bool + func BodyOf[T any]() *Body + func RawBody(schema *Schema) *Body + type OperationConfig struct + Description string + OperationID string + PathParams []Param + Query []Param + RequestBody *Body + Responses map[int]Response + Summary string + Tags []string + type Param struct + Description string + Name string + Required bool + Schema *Schema + type Registry struct + func (r *Registry) Schemas() map[string]*Schema + type Response struct + Description string + MediaType string + func JSONResponse[T any](description string) Response + func ListResponse[T any](description string) Response + func TextResponse(description string) Response + type RouteInfo struct + Method string + Path string + PathParams []string + func Harvest(app *web.App) []RouteInfo + func HarvestRouter(routes []web.Route) []RouteInfo + type Schema struct + AdditionalProperties *Schema + Description string + Enum []any + ExclusiveMaximum bool + ExclusiveMinimum bool + Format string + Items *Schema + MaxItems *int + MaxLength *int + Maximum *float64 + MinItems *int + MinLength *int + Minimum *float64 + Pattern string + Properties map[string]*Schema + Ref string + Required []string + Type typeField + func SchemaFor(t reflect.Type) *Schema + func SchemaOf[T any]() *Schema + type Spec struct + Description string + Title string + Version string + func FromApp(app *web.App, title, version string) *Spec + func New(title, version string) *Spec + func (s *Spec) AddServer(url, description string) *Spec + func (s *Spec) DocsHandler(specURL string) http.Handler + func (s *Spec) Handler() http.Handler + func (s *Spec) JSON() ([]byte, error) + func (s *Spec) Map() (map[string]any, error) + func (s *Spec) Operation(method, path string, cfg OperationConfig) *Spec + func (s *Spec) Registry() *Registry + func (s *Spec) Tags() []string