How is the data parameter constructed in the swap function of 1inch AggregationRouterV5

The swap function in AggregationRouterV5 is like this

/// @notice Performs a swap, delegating all calls encoded in `data` to `executor`. See tests for usage examples
    /// @dev router keeps 1 wei of every token on the contract balance for gas optimisations reasons. This affects first swap of every token by leaving 1 wei on the contract.
    /// @param executor Aggregation executor that executes calls described in `data`
    /// @param desc Swap description
    /// @param permit Should contain valid permit that can be used in `IERC20Permit.permit` calls.
    /// @param data Encoded calls that `caller` should execute in between of swaps
    /// @return returnAmount Resulting token amount
    /// @return spentAmount Source token amount
    function swap(
        IAggregationExecutor executor,
        SwapDescription calldata desc,
        bytes calldata permit,
        bytes calldata data
    )
        external
        payable
        returns (
            uint256 returnAmount,
            uint256 spentAmount
        )
    {

and i want to know how is data constructed, it's doc just says "see tests for usage example". It confused me, can anyone help?

Hi, Did you fund your answer? I'm working on same thing

Exactly didn't, Someone told me that 1inch has a server constantly monitoring the data, caculate a good path off-chain. 1inch has api documentation to transfer the data obtained from its off-chain api to the contract.The additional path is calculated on the off-chain server, and the data is also generated based on the path calculated by the off-chain server. So I switched to Uniswap, although 1inch is better.