Libraries
    Preparing search index...

    Interface CallbackDefinition<TBody>

    A callback declaration for async request/response patterns.

    interface CallbackDefinition<TBody = any> {
        body?: SchemaBuilder<any, any, any, any, any>;
        description?: string;
        expression?: string;
        method?: string;
        response?: SchemaBuilder<any, any, any, any, any>;
        summary?: string;
        urlFrom?: (
            body: TBody extends ObjectSchemaBuilder<
                any,
                any,
                any,
                any,
                any,
                {},
                [],
            >
                ? PropertyDescriptorTree<TBody, TBody>
                : PropertyRefTree<any>,
        ) => unknown;
    }

    Type Parameters

    • TBody = any
    Index

    Properties

    body?: SchemaBuilder<any, any, any, any, any>

    Request body schema for the callback payload.

    description?: string

    Detailed description of the callback operation.

    expression?: string

    Raw OpenAPI runtime expression for the callback URL, e.g. '{$request.body#/callbackUrl}'. Mutually exclusive with urlFrom.

    method?: string

    HTTP method for the callback request (default: 'POST').

    response?: SchemaBuilder<any, any, any, any, any>

    Response schema expected from the callback consumer.

    summary?: string

    Short summary of the callback operation.

    urlFrom?: (
        body: TBody extends ObjectSchemaBuilder<any, any, any, any, any, {}, []>
            ? PropertyDescriptorTree<TBody, TBody>
            : PropertyRefTree<any>,
    ) => unknown

    Type-safe selector for the request body field holding the callback URL. The generator converts the selected property to a '{$request.body#/<pointer>}' expression automatically. Mutually exclusive with expression.