Versions in this module Expand all Collapse all v0 v0.1.0 Oct 16, 2026 Changes in this version + func Delete[In, Out any](api *API, path string, h Handler[In, Out], opts ...RouteOption) + func Get[In, Out any](api *API, path string, h Handler[In, Out], opts ...RouteOption) + func Patch[In, Out any](api *API, path string, h Handler[In, Out], opts ...RouteOption) + func Post[In, Out any](api *API, path string, h Handler[In, Out], opts ...RouteOption) + func Put[In, Out any](api *API, path string, h Handler[In, Out], opts ...RouteOption) + type API struct + func New(r chi.Router, cfg Config) *API + func (a *API) OpenAPI() *OpenAPI + func (a *API) Route(pattern string, fn func(sub *API)) + func (a *API) Router() chi.Router + func (a *API) With(mw ...func(http.Handler) http.Handler) *API + type Components struct + Schemas map[string]*Schema + type Config struct + Description string + DocsPath string + ErrorHandler func(w http.ResponseWriter, r *http.Request, err error) + MaxBodyBytes int64 + SpecPath string + Title string + Version string + type Error struct + Detail string + Errors []ErrorDetail + Status int + Title string + Type string + func BadRequest(detail string) *Error + func Conflict(detail string) *Error + func FieldError(location, message string) *Error + func Forbidden(detail string) *Error + func InternalServerError(detail string) *Error + func NewError(status int, detail string) *Error + func NotFound(detail string) *Error + func Unauthorized(detail string) *Error + func UnprocessableEntity(detail string) *Error + func (e *Error) Error() string + type ErrorDetail struct + Location string + Message string + Value any + type Handler func(ctx context.Context, in *In) (*Out, error) + type Info struct + Description string + Title string + Version string + type MediaType struct + Schema *Schema + type OpenAPI struct + Components *Components + Info Info + OpenAPI string + Paths map[string]*PathItem + type Operation struct + Deprecated bool + Description string + OperationID string + Parameters []*Parameter + RequestBody *RequestBody + Responses map[string]*Response + Summary string + Tags []string + type Parameter struct + Description string + In string + Name string + Required bool + Schema *Schema + type PathItem struct + Delete *Operation + Get *Operation + Patch *Operation + Post *Operation + Put *Operation + type RequestBody struct + Content map[string]*MediaType + Required bool + type Response struct + Content map[string]*MediaType + Description string + type RouteOption func(*routeConfig) + func Deprecated() RouteOption + func Description(s string) RouteOption + func OperationID(id string) RouteOption + func Status(code int) RouteOption + func Summary(s string) RouteOption + func Tags(tags ...string) RouteOption + type Schema struct + AdditionalProperties *Schema + AnyOf []*Schema + ContentEncoding string + Default any + Description string + Enum []any + Examples []any + 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 any