Iskra API Reference
    Preparing search index...

    Interface RouteDescription

    How a route appears in /openapi.json. See describeRoute().

    interface RouteDescription {
        deprecated?: boolean;
        description?: string;
        hidden?: boolean;
        list?: object;
        ok?: object;
        operationId?: string;
        request?: {
            body?: object;
            bodyTypes?: string[];
            headers?: object;
            params?: object;
            query?: object;
        };
        responses?: Record<string | number, ResponseDoc>;
        security?: Record<string, string[]>[];
        summary?: string;
        tags?: string[];
    }
    Index
    deprecated?: boolean
    description?: string
    hidden?: boolean

    Leave the route out of the spec (with routes: 'all', or a route of a described group).

    list?: object

    The 200 of list(c, page): the schema of one item, wrapped as the response contract answers.

    ok?: object

    The 200 of ok(c, data): the schema of data, wrapped as the response contract answers.

    operationId?: string
    request?: {
        body?: object;
        bodyTypes?: string[];
        headers?: object;
        params?: object;
        query?: object;
    }

    What the request carries, besides what the route's validate() declares.

    Type Declaration

    • Optionalbody?: object
    • OptionalbodyTypes?: string[]

      The body's media types. Default ['application/json'].

    • Optionalheaders?: object
    • Optionalparams?: object
    • Optionalquery?: object
    responses?: Record<string | number, ResponseDoc>

    Responses by status (201, 'default').

    security?: Record<string, string[]>[]

    The route's security requirements, instead of what its gates declare ([{ bearer: [] }]); [] for a public route under a global security.

    summary?: string
    tags?: string[]

    Added to the tags of the groups the route is in.