Versions in this module Expand all Collapse all v3 v3.1.0 Jun 2, 2026 Changes in this version type OpenAPIOptions + Hidden bool v3.0.1 Jun 2, 2026 v3.0.0 Jun 2, 2026 Changes in this version + func APIKeyMiddleware(validator AuthorizationService, scheme SecurityScheme) fiber.Handler + func AWSSignatureMiddleware(validator AuthorizationService) fiber.Handler + func BasicAuthMiddleware(validator AuthorizationService) fiber.Handler + func BearerTokenMiddleware(validator AuthorizationService) fiber.Handler + func ConditionalAuthMiddleware(authMiddleware fiber.Handler, excludePaths ...string) fiber.Handler + func DefaultNotFoundHandler() fiber.Handler + func Delete[TInput any, TOutput any, TError any](router OApiRouter, path string, handler HandlerFunc[TInput, TOutput, TError], ...) + func Get[TInput any, TOutput any, TError any](router OApiRouter, path string, handler HandlerFunc[TInput, TOutput, TError], ...) + func Head[TInput any, TOutput any, TError any](router OApiRouter, path string, handler HandlerFunc[TInput, TOutput, TError], ...) + func Method[TInput any, TOutput any, TError any](router OApiRouter, m string, path string, ...) + func MultiSchemeAuthMiddleware(authService AuthorizationService, config Config) fiber.Handler + func Patch[TInput any, TOutput any, TError any](router OApiRouter, path string, handler HandlerFunc[TInput, TOutput, TError], ...) + func Post[TInput any, TOutput any, TError any](router OApiRouter, path string, handler HandlerFunc[TInput, TOutput, TError], ...) + func Put[TInput any, TOutput any, TError any](router OApiRouter, path string, handler HandlerFunc[TInput, TOutput, TError], ...) + func RequireResourceAccess(c fiber.Ctx, authService AuthorizationService, ...) error + func RoleGuard(validator AuthorizationService, requiredRoles ...string) fiber.Handler + func SmartAuthMiddleware(authService AuthorizationService, config Config) fiber.Handler + type APIKeyValidator interface + ValidateAPIKey func(key string, location string, paramName string) (*AuthContext, error) + type AWSSignatureParams struct + AccessKeyID string + Body []byte + Date string + Headers map[string]string + Method string + Path string + QueryString string + RawHeader string + Region string + Service string + Signature string + SignedHeaders []string + type AWSSignatureValidator interface + ValidateAWSSignature func(params *AWSSignatureParams) (*AuthContext, error) + type AuthContext struct + Claims map[string]interface{} + Roles []string + Scopes []string + UserID string + func GetAuthContext(c fiber.Ctx) (*AuthContext, error) + type AuthError struct + Message string + StatusCode int + func (e *AuthError) Error() string + type AuthErrorHandler func(c fiber.Ctx, err *AuthError) error + type AuthorizationService interface + CanAccessResource func(ctx *AuthContext, resourceType, resourceID, action string) (bool, error) + GetUserPermissions func(ctx *AuthContext, resourceType, resourceID string) (*ResourcePermission, error) + HasRole func(ctx *AuthContext, role string) bool + HasScope func(ctx *AuthContext, scope string) bool + ValidateToken func(token string) (*AuthContext, error) + type BasicAuthValidator interface + ValidateBasicAuth func(username, password string) (*AuthContext, error) + type Config struct + AuthErrorHandler AuthErrorHandler + AuthService AuthorizationService + DefaultErrorShape any + DefaultSecurity []map[string][]string + EnableAuthorization bool + EnableOpenAPIDocs bool + EnableValidation bool + IncludeInvalidValueInErrors bool + NotFoundHandler fiber.Handler + OpenAPIDescription string + OpenAPIDocsPath string + OpenAPIJSONPath string + OpenAPITitle string + OpenAPIVersion string + OpenAPIYamlPath string + SecuritySchemes map[string]SecurityScheme + ValidationErrorHandler ValidationErrorHandler + func DefaultConfig() Config + type DocConfig struct + Description string + DocsPath string + JSONPath string + Title string + Version string + YamlPath string + func DefaultDocConfig() DocConfig + type ErrorEnvelope struct + Errors []ValidationErrorEntry + ResponseContext ResponseContext + func NotFoundEnvelope(c fiber.Ctx) ErrorEnvelope + type ErrorResponse struct + Code int + Details string + Type string + type HTTPDescriptionError interface + Description func() string + type HTTPStatusError interface + HTTPStatus func() int + type HandlerFunc func(c fiber.Ctx, input TInput) (TOutput, TError) + type OApiApp struct + func New(app *fiber.App, config ...Config) *OApiApp + func (app *OApiApp) Group(prefix string, handlers ...fiber.Handler) *OApiGroup + func (o *OApiApp) Config() Config + func (o *OApiApp) GenerateOpenAPISpec() map[string]interface{} + func (o *OApiApp) GenerateOpenAPISpecYAML() (string, error) + func (o *OApiApp) GetApp() *OApiApp + func (o *OApiApp) GetOperations() []OpenAPIOperation + func (o *OApiApp) GetPrefix() string + func (o *OApiApp) Listen(addr string) error + func (o *OApiApp) SetupDocs(config ...DocConfig) + func (o *OApiApp) Use(middleware fiber.Handler) + func (o *OApiApp) UseNotFoundHandler() + type OApiGroup struct + func Group(router OApiRouter, prefix string, handlers ...fiber.Handler) *OApiGroup + func (g *OApiGroup) GetApp() *OApiApp + func (g *OApiGroup) GetPrefix() string + func (g *OApiGroup) Group(prefix string, handlers ...fiber.Handler) *OApiGroup + func (g *OApiGroup) Use(middleware fiber.Handler) + type OApiRouter interface + GetApp func() *OApiApp + GetPrefix func() string + type OpenAPIOperation struct + ErrorType reflect.Type + InputType reflect.Type + Method string + Options OpenAPIOptions + OutputType reflect.Type + Path string + type OpenAPIOptions struct + Description string + Errors []any + OperationID string + Parameters []map[string]any + RequireAllRoles bool + RequiredPermissions []string + RequiredRoles []string + ResourceType string + Security any + Summary string + Tags []string + func WithAllRoles(options OpenAPIOptions, roles ...string) OpenAPIOptions + func WithPermissions(options OpenAPIOptions, permissions ...string) OpenAPIOptions + func WithResourceType(options OpenAPIOptions, resourceType string) OpenAPIOptions + func WithRoles(options OpenAPIOptions, roles ...string) OpenAPIOptions + func WithSecurity(options OpenAPIOptions, security interface{}) OpenAPIOptions + func WithSecurityDisabled(options OpenAPIOptions) OpenAPIOptions + type OpenAPIParameter struct + Description string + In string + Name string + Required bool + Schema map[string]any + type OpenAPIRequestBody struct + Content map[string]any + Description string + Required bool + type OpenAPIResponse struct + Content map[string]any + Description string + type PathInfo struct + Index int + IsPath bool + Name string + type ResourcePermission struct + Actions []string + ResourceID string + ResourceType string + type ResponseContext struct + ResponseID string + type ScopeError struct + Scope string + func (e *ScopeError) Error() string + type SecurityScheme struct + BearerFormat string + Description string + Flows map[string]interface{} + In string + Name string + Scheme string + Type string + type ValidationErrorEntry struct + Code int + Constraint string + Field string + Loc []any + Msg string + Type string + Value any + type ValidationErrorHandler func(c fiber.Ctx, err error) error v3.0.0-beta.1 May 22, 2026 Other modules containing this package github.com/labbs/fiber-oapi