{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roark/json-schema/roark-add-flow-edge-case-input-schema.json",
  "title": "AddFlowEdgeCaseInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roark-customer-flow-edge-case-api-openapi.yml#/components/schemas/AddFlowEdgeCaseInput",
  "$ref": "#/$defs/FlowEdgeCaseInput",
  "$defs": {
    "FlowEdgeCaseInput": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1
        },
        "environmentId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "prompt": {
          "type": [
            "string",
            "null"
          ]
        },
        "precededByCustomerFlowId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "precededByCustomerFlowVariantId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "includeFlowExpectations": {
          "type": "boolean",
          "description": "Whether this edge case is graded on the flow's agentExpectations as well as its own additionalExpectations. Defaults to true; false grades it on its additionalExpectations only."
        },
        "additionalExpectations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FlowExpectationInput"
          },
          "description": "The expectations graded on this variant only, on top of the flow's own. Sent as the complete set: it replaces whatever the variant had, so omit it to leave the set alone and send [] to clear it. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on every graph edit."
        },
        "personaOverrideId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "The persona this runs as. Omit to inherit the happy path's."
        }
      },
      "required": [
        "title"
      ]
    },
    "FlowExpectationInput": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string",
          "minLength": 1,
          "description": "What the agent under test is graded against."
        }
      },
      "required": [
        "prompt"
      ]
    }
  }
}