AutoBE
    Preparing search index...

    Conditional expression for inline value selection.

    Represents the ternary operator (condition ? trueValue : falseValue) for inline conditional value selection. Useful when values need to be chosen based on business conditions within expressions.

    E2E testing scenarios:

    • Conditional parameter values based on captured test data
    • Dynamic value selection based on business rules from API responses
    • Fallback value specification for optional data
    • Simple conditional logic within expression contexts

    AI function calling context: Use when business logic requires different values based on runtime conditions within expressions, where the conditions and values don't involve direct API calls.

    interface IConditionalExpression {
        condition: IExpression;
        type: "conditionalExpression";
        whenFalse: IExpression;
        whenTrue: IExpression;
    }
    Index

    Properties

    condition: IExpression

    Boolean condition determining which value to select.

    Should represent meaningful business logic conditions based on captured data rather than arbitrary technical conditions. Can reference data captured from previous API operations.

    type: "conditionalExpression"

    Type discriminator.

    whenFalse: IExpression

    Expression evaluated and returned when condition is false.

    Represents the alternative or fallback value for the business scenario. Can reference captured API data or computed values.

    whenTrue: IExpression

    Expression evaluated and returned when condition is true.

    Represents the primary or expected value for the business scenario. Can reference captured API data or computed values.