{
  "type": "single-step-form",
  "schema": {
    "$ref": "schema#/"
  },
  "discriminator": {
    "schoolType": {
      "type": "string"
    }
  },
  "elements": [
    {
      "type": "radio",
      "schema": {
        "$ref": "discriminator#/properties/schoolType"
      },
      "options": [
        {
          "text": "Primary School",
          "value": "primary"
        },
        {
          "text": "High School",
          "value": "high"
        }
      ]
    },
    {
      "type": "input",
      "schema": {
        "$ref": "schema#/properties/name"
      },
      "label": {
        "text": "name"
      },
      "onChange": "deleteClass1"
    },
    {
      "type": "reusable-element",
      "schema": {
        "$ref": "schema#/properties/grade"
      },
      "dataContext": {
        "schoolType": {
          "$ref": "discriminator#/properties/schoolType"
        },
        "schoolName": {
          "$ref": "schema#/properties/name"
        },
        "studentName": {
          "$ref": "data#/properties/studentName"
        }
      },
      "functionCallbacks": {
        "updateStudentName": {
          "$ref": "parentFunctions#/updateName"
        }
      },
      "alias": "grade",
      "label": {
        "text": "schoolGrade"
      },
      "show_label": true,
      "moduleResolver": "fetchGradeJsons"
    }
  ]
}
