json_schema: {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
          "yesno": {
              "enum": [
                  "yes",
                  "no"
              ],
              "type": "string"
          },
          "dog": {
              "properties": {
                  "animal": {
                      "allOf": [
                          {
                              "$ref": "#/definitions/yesno"
                          }
                      ],
                      "enum": [
                          "yes"
                      ]
                  }
              },
              "type": "object"
          }
      },
      "properties": {
          "yesno": {
              "$ref": "#/definitions/yesno"
          },
          "dog": {
              "$ref": "#/definitions/dog"
          }
      },
      "required": [
          "yesno",
          "dog"
      ]
  }