{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/xiaojiou176-open/Switchyard/docs/builder-journeys.schema.json",
  "title": "Switchyard Builder Journeys",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "journeyVersion",
    "journeys"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "journeyVersion": {
      "type": "integer",
      "minimum": 1
    },
    "journeys": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/journey"
      }
    }
  },
  "$defs": {
    "starterKind": {
      "type": "string",
      "enum": [
        "builder",
        "skill"
      ]
    },
    "stringArray": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "journey": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "label",
        "starterKind",
        "recommendedPack",
        "entryDoc",
        "comparisonDoc",
        "executionDoc",
        "runnableCommand",
        "readOnly",
        "safeClaims",
        "notYetSupported",
        "searchKeywords"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "starterKind": {
          "$ref": "#/$defs/starterKind"
        },
        "recommendedPack": {
          "type": "string",
          "minLength": 1
        },
        "entryDoc": {
          "type": "string",
          "minLength": 1
        },
        "comparisonDoc": {
          "type": "string",
          "minLength": 1
        },
        "executionDoc": {
          "type": "string",
          "minLength": 1
        },
        "runnableCommand": {
          "type": "string",
          "minLength": 1
        },
        "readOnly": {
          "type": "boolean"
        },
        "safeClaims": {
          "$ref": "#/$defs/stringArray"
        },
        "notYetSupported": {
          "$ref": "#/$defs/stringArray"
        },
        "searchKeywords": {
          "$ref": "#/$defs/stringArray"
        }
      }
    }
  }
}
