Setu-TS
    Preparing search index...

    Interface IRouterApi

    Router registration surface exposed to plugins and applications.

    Every verb method accepts either a bare handler or a full RouteDefinition with middleware and schemas.

    0.1.0

    interface IRouterApi {
        delete(path: string, route: RouteHandler | RouteDefinition): void;
        get(path: string, route: RouteHandler | RouteDefinition): void;
        group(prefix: string, configure: (router: IRouterApi) => void): void;
        head(path: string, route: RouteHandler | RouteDefinition): void;
        listRoutes(): readonly RouteInfo[];
        options(path: string, route: RouteHandler | RouteDefinition): void;
        patch(path: string, route: RouteHandler | RouteDefinition): void;
        post(path: string, route: RouteHandler | RouteDefinition): void;
        put(path: string, route: RouteHandler | RouteDefinition): void;
    }
    Index
    • Creates a route group: routes registered inside the callback share the prefix and any group middleware.

      Parameters

      • prefix: string

        Path prefix for every route in the group

      • configure: (router: IRouterApi) => void

        Receives a router scoped to the prefix

      Returns void

    • Returns all registered routes for introspection.

      Used by the OpenAPI plugin to generate documentation from route definitions.

      Returns readonly RouteInfo[]

      Immutable array of route information in registration order

      0.1.0

    post