@bearnjs/rest
    Preparing search index...

    Interface Route

    Describes a route registered at runtime, including its method, path, and handler. Route

    interface Route {
        handler: Handler;
        method: HttpMethod;
        middlewares?: Handler<
            Record<string, string>,
            Record<string, string>,
            JsonValue,
            JsonValue,
        >[];
        paramNames?: string[];
        path: string;
        regex?: RegExp;
        schema?: RouteSchema;
    }
    Index

    Properties

    handler: Handler

    The function that handles requests to this route.

    method: HttpMethod

    The HTTP method for the route.

    middlewares?: Handler<
        Record<string, string>,
        Record<string, string>,
        JsonValue,
        JsonValue,
    >[]

    Middlewares that run before the route handler.

    paramNames?: string[]

    Names of parameters extracted from the path.

    path: string

    The URL path pattern for the route.

    regex?: RegExp

    A compiled regular expression for the path, if applicable.

    schema?: RouteSchema

    Metadata describing the route's schema.