{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/github-discussion.json",
  "$comment": "https://docs.github.com/en/discussions/managing-discussions-for-your-community/syntax-for-discussion-category-forms",
  "additionalProperties": false,
  "properties": {
    "title": {
      "description": "A default title that will be pre-populated in the discussion submission form.",
      "type": "string"
    },
    "labels": {
      "description": "Labels that will automatically be added to discussions created with this template.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "body": {
      "description": "Definition of the input types in the discussion form",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["markdown", "textarea", "input", "dropdown", "checkboxes"]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "placeholder": {
                "type": "string"
              }
            }
          },
          "validations": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              }
            }
          }
        }
      }
    }
  },
  "required": ["body"],
  "type": "object"
}
