{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/opper/json-schema/opper-dynamic-route-create-request-schema.json",
  "title": "DynamicRouteCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opper-management-api-openapi.yml#/components/schemas/DynamicRouteCreateRequest",
  "properties": {
    "deploy": {
      "description": "When true the draft is validated and deployed as version 1 in the same call; the response then carries deployed_version in meta.",
      "type": "boolean"
    },
    "description": {
      "description": "Free-text description shown in the platform.",
      "type": "string"
    },
    "display_name": {
      "description": "Optional human label; preserves case and spaces. Empty uses the route identifier. Editable without deploying.",
      "maxLength": 128,
      "type": "string"
    },
    "graph": {
      "description": "Routing graph object with elements. Each node has id, type, outputs mapping output names to {elementId: targetID}, and optional properties. Include START/start and END/end. Supported types: start, end, model, pool, conditional, percentage, classifier, observe. Omit graph on create to seed a default; copy its returned draft.graph to customize. See tool description for node properties and topology.",
      "properties": {
        "elements": {
          "items": {
            "properties": {
              "id": {
                "type": "string"
              },
              "outputs": {
                "additionalProperties": {
                  "properties": {
                    "elementId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "elementId"
                  ],
                  "type": "object"
                },
                "type": "object"
              },
              "properties": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "type",
              "outputs"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "elements"
      ],
      "type": "object"
    },
    "layout": {
      "description": "Editor canvas positions keyed by element id. Opaque to the gateway; omit when authoring from code.",
      "type": "object"
    },
    "name": {
      "description": "Route name; callers invoke the route as dynamic/<name>. Lowercase letters and digits plus '.' '_' '-'; up to 128 characters; unique per organization.",
      "type": "string"
    },
    "note": {
      "description": "Release note recorded on the deployed version. Only read when deploy is true.",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "type": "object"
}