AutoBE
    Preparing search index...

    Request body information of OpenAPI operation.

    This interface defines the structure for request bodies in API routes. It corresponds to the requestBody section in OpenAPI specifications, providing both a description and schema reference for the request payload.

    The content-type for all request bodies is always application/json. Even when file uploading is required, don't use multipart/form-data or application/x-www-form-urlencoded content types. Instead, just define an URI string property in the request body schema.

    Note that, all body schemas must be transformable to a reference type defined in the components section as an object type.

    In OpenAPI, this might represent:

    {
    "requestBody": {
    "description": "Creation info of the order",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/IShoppingOrder.ICreate"
    }
    }
    }
    }
    }
    interface IRequestBody {
        description: string;
        typeName: string;
    }
    Index

    Properties

    description: string

    Description about the request body.

    Make short, concise and clear description about the request body.

    MUST be written in English. Never use other languages.

    typeName: string

    Request body type name.

    This specifies the data structure expected in the request body, that will be transformed to reference type in the components section as an AutoBeOpenApi.IJsonSchema.Object object type.

    Here is the naming convention for the request body type:

    • IEntityName.ICreate: Request body for creation operations (POST)
    • IEntityName.IUpdate: Request body for update operations (PUT)
    • IEntityName.IRequest: Request parameters for list operations (often with search/pagination)

    What you write:

    {
    "typeName": "IShoppingOrder.ICreate"
    }

    Transformed to:

    {
    "schema": {
    "$ref": "#/components/schemas/IShoppingOrder.ICreate"
    }
    }