Iskra API Reference
    Preparing search index...

    Interface OpenAPIConfig

    interface OpenAPIConfig {
        authorize?: (
            c: Context,
        ) => boolean | Response | Promise<boolean | Response>;
        contact?: { email?: string; name?: string; url?: string };
        description?: string;
        docs?: boolean;
        externalDocs?: { description: string; url: string };
        license?: { name: string; url?: string };
        routes?: false | "described" | "all";
        scalar?:
            | false
            | "local"
            | { file: string }
            | { integrity: string; src: string };
        security?: Record<string, string[]>[];
        securitySchemes?: {
            [securityScheme: string]: SecuritySchemeObject | ReferenceObject;
        };
        servers?: { description?: string; url: string }[];
        tags?: { description?: string; name: string }[];
        title: string;
        version: string;
    }
    Index
    authorize?: (c: Context) => boolean | Response | Promise<boolean | Response>

    Whether a request may read /openapi.json and /docs: false answers 403, a Response is sent as it is (a 401 asking for Basic auth, say). These routes come before middleware added to the app after initialize(), so an auth middleware there does not cover them.

    contact?: { email?: string; name?: string; url?: string }
    description?: string
    docs?: boolean

    Serve /openapi.json and the /docs page (default true). false serves neither; the routes added with addRoute() work the same.

    externalDocs?: { description: string; url: string }
    license?: { name: string; url?: string }
    routes?: false | "described" | "all"

    Which of the app's own routes (not addRoute()'s) the spec lists: 'described' (the default), those a describeRoute() describes, on the route or its group; 'all', every route; false, none.

    scalar?: false | "local" | { file: string } | { integrity: string; src: string }

    The Scalar API reference script /docs loads. Default: a pinned @scalar/api-reference release from jsDelivr, with its SRI hash. 'local': the one of the installed @scalar/api-reference, served by the app at /docs/scalar.js (nothing is loaded from a CDN). { file }: that bundle (standalone.js) from disk, served the same way. { src, integrity }: a script by URL with its sha384-… hash. false serves /openapi.json without the page.

    security?: Record<string, string[]>[]
    securitySchemes?: {
        [securityScheme: string]: SecuritySchemeObject | ReferenceObject;
    }

    OpenAPI security scheme objects, by name (as in the spec's components).

    servers?: { description?: string; url: string }[]
    tags?: { description?: string; name: string }[]
    title: string
    version: string