Libraries
    Preparing search index...

    Interface EndpointMetadata

    Snapshot of all configuration set on an EndpointBuilder. Used by the server for routing and by @cleverbrush/server-openapi for spec generation.

    interface EndpointMetadata {
        authRoles: readonly string[] | null;
        basePath: string;
        bodySchema: SchemaBuilder<any, any, any, any, any> | null;
        callbacks: Record<string, CallbackDefinition<any>> | null;
        deprecated: boolean;
        description: string | null;
        example: unknown;
        examples:
            | Record<
                string,
                { description?: string; summary?: string; value: unknown },
            >
            | null;
        externalDocs: { description?: string; url: string } | null;
        headerSchema: ObjectSchemaBuilder<any, any, any, any, any, any, any> | null;
        links: Record<string, LinkDefinition<any>> | null;
        method: string;
        operationId: string | null;
        pathTemplate: RoutePath;
        produces:
            | Record<string, { schema?: SchemaBuilder<any, any, any, any, any> }>
            | null;
        producesFile: { contentType?: string; description?: string } | null;
        querySchema: ObjectSchemaBuilder<any, any, any, any, any, any, any> | null;
        responseHeaderSchema:
            | ObjectSchemaBuilder<any, any, any, any, any, any, any>
            | null;
        responseSchema: SchemaBuilder<any, any, any, any, any> | null;
        responsesSchemas:
            | Record<number, SchemaBuilder<any, any, any, any, any> | null>
            | null;
        serviceSchemas:
            | Record<string, SchemaBuilder<any, any, any, any, any>>
            | null;
        summary: string | null;
        tags: readonly string[];
    }
    Index

    Properties

    authRoles: readonly string[] | null

    Authorization roles required for this endpoint.

    • null → no authorization required (public)
    • [] → any authenticated user
    • ['admin', ...] → user must have at least one of these roles
    basePath: string
    bodySchema: SchemaBuilder<any, any, any, any, any> | null
    callbacks: Record<string, CallbackDefinition<any>> | null

    Callbacks declared via .callbacks(), emitted as callbacks on the OpenAPI Operation Object.

    deprecated: boolean
    description: string | null
    example: unknown

    A single example value for the request body, emitted as example on the OpenAPI Media Type Object.

    examples:
        | Record<
            string,
            { description?: string; summary?: string; value: unknown },
        >
        | null

    A map of named examples for the request body, emitted as examples on the OpenAPI Media Type Object. Each entry follows the OpenAPI Example Object shape.

    externalDocs: { description?: string; url: string } | null

    External documentation URL for this operation, emitted as externalDocs on the OpenAPI Operation Object.

    headerSchema: ObjectSchemaBuilder<any, any, any, any, any, any, any> | null
    links: Record<string, LinkDefinition<any>> | null

    Response links declared via .links(), emitted under the primary success response's links map in the OpenAPI spec.

    method: string
    operationId: string | null
    pathTemplate: RoutePath
    produces:
        | Record<string, { schema?: SchemaBuilder<any, any, any, any, any> }>
        | null

    Multiple response content types for content-negotiated endpoints. Keys are MIME types; an optional schema overrides the default response schema for that content type. When set alongside .producesFile(), producesFile takes precedence.

    producesFile: { contentType?: string; description?: string } | null

    When set, the endpoint produces a binary file response instead of JSON. The OpenAPI spec will emit the appropriate binary content type.

    querySchema: ObjectSchemaBuilder<any, any, any, any, any, any, any> | null
    responseHeaderSchema:
        | ObjectSchemaBuilder<any, any, any, any, any, any, any>
        | null

    Schema describing response headers emitted on every response code. Each property in the object schema becomes a header name with its sub-schema and optional description.

    responseSchema: SchemaBuilder<any, any, any, any, any> | null
    responsesSchemas:
        | Record<number, SchemaBuilder<any, any, any, any, any> | null>
        | null

    Per-status-code response schemas declared via .responses(). When non-null, takes precedence over responseSchema for OpenAPI generation and constrains the handler return type to the declared codes. A null schema value means the response has no body (e.g. 204).

    serviceSchemas: Record<string, SchemaBuilder<any, any, any, any, any>> | null
    summary: string | null
    tags: readonly string[]