@typia/website
    Preparing search index...

    Object type info.

    interface IObject {
        additionalProperties?: boolean | IChatGptSchema;
        deprecated?: boolean;
        description?: string;
        example?: any;
        examples?: Record<string, any>;
        properties: Record<string, IChatGptSchema>;
        required: string[];
        title?: string;
        type: "object";
    }

    Hierarchy (View Summary)

    Index

    Properties

    additionalProperties?: boolean | IChatGptSchema

    Additional properties information.

    The additionalProperties defines the type schema for additional properties that are not listed in the properties.

    If the value is true, it means that the additional properties are not restricted. They can be any type. Otherwise, if the value is IChatGptSchema type, it means that the additional properties must follow the type schema info.

    • true: Record<string, any>
    • IChatGptSchema: Record<string, T>

    Note: If you've configured IChatGptSchema.IConfig.strict as true, ChatGPT function calling does not support dynamic key typed properties, so additionalProperties is always false.

    deprecated?: boolean

    Whether the type is deprecated or not.

    description?: string

    Detailed description of the schema.

    example?: any

    Example value.

    examples?: Record<string, any>

    List of example values as key-value pairs.

    properties: Record<string, IChatGptSchema>

    Properties of the object.

    The properties means a list of key-value pairs of the object's regular properties. The key is the name of the regular property, and the value is the type schema info.

    required: string[]

    List of required property keys.

    The required contains a list of property keys from properties that must be provided. Properties not listed in required are optional, while those listed must be filled.

    Below is an example of properties and required:

    interface SomeObject {
    id: string;
    email: string;
    name?: string;
    }

    As you can see, id and email properties are required, so they are listed in the required array.

    {
    "type": "object",
    "properties": {
    "id": { "type": "string" },
    "email": { "type": "string" },
    "name": { "type": "string" }
    },
    "required": ["id", "email"]
    }
    title?: string

    Title of the schema.

    type: "object"

    Discriminator value of the type.