AutoBE
    Preparing search index...

    Array type info.

    interface IArray {
        items: AutoBeOpenApi.IJsonSchema;
        maxItems?: number;
        minItems?: number;
        type: "array";
        uniqueItems?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Items type info.

    The items means the type of the array elements. In other words, it is the type schema info of the T in the TypeScript array type Array<T>.

    maxItems?: number

    Maximum items restriction.

    Restriction of maximum number of items in the array.

    minItems?: number

    Minimum items restriction.

    Restriction of minimum number of items in the array.

    type: "array"

    Discriminator value of the type.

    CRITICAL: This MUST be a SINGLE string value, NOT an array. The type field identifies the JSON Schema type and must be exactly one of: "boolean", "integer", "number", "string", "array", "object", or "null".

    ❌ INCORRECT: type: ["string", "null"] // This is WRONG! ✅ CORRECT: type: "string" // For nullable string, use oneOf instead

    If you need to express a nullable type (e.g., string | null), you MUST use the IOneOf structure:

    {
    "oneOf": [{ "type": "string" }, { "type": "null" }]
    }

    NEVER use array notation in the type field. The type field is a discriminator that accepts only a single string value.

    uniqueItems?: boolean

    Unique items restriction.

    If this property value is true, target array must have unique items.