AutoBE
    Preparing search index...

    Union type.

    IOneOf represents an union type of the TypeScript (A | B | C).

    For reference, even though your Swagger (or OpenAPI) document has defined anyOf instead of the oneOf, AutoBeOpenApi forcibly converts it to oneOf type.

    interface IOneOf {
        description: string;
        discriminator?: IDiscriminator;
        oneOf: (
            | AutoBeOpenApi.IJsonSchema.IInteger
            | AutoBeOpenApi.IJsonSchema.INumber
            | AutoBeOpenApi.IJsonSchema.IString
            | AutoBeOpenApi.IJsonSchema.IConstant
            | AutoBeOpenApi.IJsonSchema.IBoolean
            | AutoBeOpenApi.IJsonSchema.IArray
            | AutoBeOpenApi.IJsonSchema.IReference
            | AutoBeOpenApi.IJsonSchema.INull
        )[];
        "x-autobe-specification": string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    description: string

    API documentation for the type.

    This is the standard OpenAPI description field that will be displayed in Swagger UI, SDK documentation, and other API documentation tools. Focus on explaining the type from an API consumer's perspective.

    The description SHOULD be organized into MULTIPLE PARAGRAPHS (separated by line breaks) covering:

    • WHAT: The purpose and business meaning of the type
    • WHY: When and why this type is used
    • Relationships: Connections to other entities in the system
    • Constraints: Validation rules visible to API consumers
    • Reference the corresponding database schema table's documentation to maintain consistency
    • Do NOT include implementation details here (use x-autobe-specification for object types)
    • Keep the language accessible to API consumers who may not know the internal implementation

    MUST be written in English. Never use other languages.

    discriminator?: IDiscriminator

    Discriminator info of the union type.

    List of the union types.

    "x-autobe-specification": string

    Implementation specification for this type.

    This is an AutoBE-internal field (not exposed in standard OpenAPI output) that provides detailed implementation guidance for downstream agents (Realize Agent, Test Agent, etc.).

    Include HOW this type should be implemented:

    • Source database tables (primary table and joined tables)
    • Overall query strategy (joins, filters, grouping)
    • Aggregation formulas if applicable (SUM, COUNT, AVG, etc.)
    • Business rules and transformation logic
    • Edge cases (nulls, empty sets, defaults)

    This field is especially critical when x-autobe-database-schema is null (for composite, computed, or request parameter types), as it provides the only guidance for implementing data retrieval or computation logic.

    MUST be written in English. Never use other languages.