{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shapes.penny.coop/question-response/1.0.0/schema.json",
  "title": "Response",
  "description": "A response to one question part, including text, media/files, yes/no or selected choice.",
  "type": "object",
  "properties": {
    "partId": {
      "title": "Part ID",
      "type": "string",
      "readOnly": true,
      "x-penny": {
        "field": "text",
        "input": "text",
        "hidden": true,
        "readOnly": true
      }
    },
    "type": {
      "title": "Type",
      "type": "string",
      "readOnly": true,
      "x-penny": {
        "field": "text",
        "input": "text",
        "hidden": true,
        "readOnly": true
      }
    },
    "text": {
      "title": "Response",
      "type": "string",
      "readOnly": true,
      "x-penny": {
        "field": "textarea",
        "input": "textarea",
        "readOnly": true
      }
    },
    "file": {
      "title": "File",
      "type": "string",
      "readOnly": true,
      "x-penny": {
        "field": "text",
        "input": "text",
        "hidden": true,
        "readOnly": true
      }
    },
    "files": {
      "title": "Files",
      "type": "array",
      "x-penny": {
        "field": "text",
        "hidden": true
      },
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "key"
        ]
      }
    },
    "fileCount": {
      "title": "File count",
      "type": "number",
      "x-penny": {
        "field": "number",
        "hidden": true
      }
    },
    "yesNo": {
      "title": "Yes/No",
      "type": "boolean",
      "readOnly": true,
      "x-penny": {
        "field": "boolean",
        "hidden": true,
        "readOnly": true
      }
    },
    "selected": {
      "title": "Selected",
      "type": "string",
      "readOnly": true,
      "x-penny": {
        "field": "text",
        "input": "text",
        "hidden": true,
        "readOnly": true
      }
    }
  },
  "required": [
    "partId",
    "type"
  ],
  "x-penny": {
    "shape": "question-response",
    "version": "1.0.0",
    "source": "app/types/questionResponse.js",
    "sourceName": "questionResponse",
    "kind": "object",
    "defaultVisibility": "private",
    "publishable": false,
    "fieldOrder": [
      "partId",
      "type",
      "text",
      "file",
      "files",
      "fileCount",
      "yesNo",
      "selected"
    ]
  }
}
