{
  "$schema": "http://json-schema.org/draft-07/schema",
  "title": "JSON schema for test",

  "type": "object",
  "properties": {
    "var": {
      "type": "string",
			"enum": ["foo", "hoge"],
			"default": "foo"
    }
  },

  "allOf": [
    {
      "if": {
        "properties": {
          "var": {
            "const": "foo"
          }
        }
      },

      "then": {
        "properties": {
          "foo": {
            "type": "string"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "var": {
            "const": "hoge"
          }
        }
      },
      "then": {
        "properties": {
          "hoge": {
            "type": "string"
          }
        }
      }
    }
  ],

  "dependencies": {
    "foo": ["var"]
  }
}
