T402 API Reference - v2.8.0
    Preparing search index...

    Interface BodyDiscoveryExtension

    Discovery extension for body methods (POST, PUT, PATCH)

    interface BodyDiscoveryExtension {
        info: BodyDiscoveryInfo;
        schema: {
            $schema: "https://json-schema.org/draft/2020-12/schema";
            type: "object";
            properties: {
                input: {
                    type: "object";
                    properties: {
                        type: { type: "string"; const: "http" };
                        method: { type: "string"; enum: BodyMethods[] };
                        bodyType: { type: "string"; enum: ["json", "form-data", "text"] };
                        body: Record<string, unknown>;
                        queryParams?: {
                            type: "object";
                            properties?: Record<string, unknown>;
                            required?: string[];
                            additionalProperties?: boolean;
                        };
                        headers?: { type: "object"; additionalProperties: { type: "string" } };
                    };
                    required: ("type" | "method" | "bodyType" | "body")[];
                    additionalProperties?: boolean;
                };
                output?: {
                    type: "object";
                    properties?: Record<string, unknown>;
                    required?: readonly string[];
                    additionalProperties?: boolean;
                };
            };
            required: ["input"];
        };
    }
    Index

    Properties

    Properties

    schema: {
        $schema: "https://json-schema.org/draft/2020-12/schema";
        type: "object";
        properties: {
            input: {
                type: "object";
                properties: {
                    type: { type: "string"; const: "http" };
                    method: { type: "string"; enum: BodyMethods[] };
                    bodyType: { type: "string"; enum: ["json", "form-data", "text"] };
                    body: Record<string, unknown>;
                    queryParams?: {
                        type: "object";
                        properties?: Record<string, unknown>;
                        required?: string[];
                        additionalProperties?: boolean;
                    };
                    headers?: { type: "object"; additionalProperties: { type: "string" } };
                };
                required: ("type" | "method" | "bodyType" | "body")[];
                additionalProperties?: boolean;
            };
            output?: {
                type: "object";
                properties?: Record<string, unknown>;
                required?: readonly string[];
                additionalProperties?: boolean;
            };
        };
        required: ["input"];
    }