{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/xiaojiou176-open/Switchyard/docs/starter-pack-chooser.schema.json",
  "title": "Switchyard Starter Pack Chooser",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "chooserVersion",
    "questions",
    "scenarios"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "chooserVersion": {
      "type": "integer",
      "minimum": 1
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/question"
      }
    },
    "scenarios": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/scenario"
      }
    }
  },
  "$defs": {
    "status": {
      "type": "string",
      "enum": [
        "supported now",
        "partial",
        "planned",
        "research only",
        "not now"
      ]
    },
    "stringArray": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "questionOption": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "label",
        "recommendedScenarios",
        "why"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "recommendedScenarios": {
          "$ref": "#/$defs/stringArray"
        },
        "why": {
          "$ref": "#/$defs/stringArray"
        }
      }
    },
    "question": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "prompt",
        "options"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "prompt": {
          "type": "string",
          "minLength": 1
        },
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/questionOption"
          }
        }
      }
    },
    "scenario": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "label",
        "status",
        "starterKind",
        "recommendedPack",
        "bestEntry",
        "whyThisPack",
        "bestWhen",
        "avoidWhen",
        "compareAgainst",
        "recommendedDocs",
        "searchKeywords",
        "safeClaims",
        "notYetSupported"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "starterKind": {
          "type": "string",
          "enum": [
            "builder",
            "skill"
          ]
        },
        "recommendedPack": {
          "type": "string",
          "minLength": 1
        },
        "bestEntry": {
          "type": "string",
          "minLength": 1
        },
        "whyThisPack": {
          "$ref": "#/$defs/stringArray"
        },
        "bestWhen": {
          "$ref": "#/$defs/stringArray"
        },
        "avoidWhen": {
          "$ref": "#/$defs/stringArray"
        },
        "compareAgainst": {
          "$ref": "#/$defs/stringArray"
        },
        "recommendedDocs": {
          "$ref": "#/$defs/stringArray"
        },
        "searchKeywords": {
          "$ref": "#/$defs/stringArray"
        },
        "safeClaims": {
          "$ref": "#/$defs/stringArray"
        },
        "notYetSupported": {
          "$ref": "#/$defs/stringArray"
        }
      }
    }
  }
}
