3
私は別のファイルの文字列の列挙を持ち、それを私のスキーマから参照したい場合のためにJSON schemaを作成しようとしています。どうすればそれを達成できますか?Json Schema - 参照を使用して列挙を使用する
サンプル・スキーマ:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"card": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"value": {
"type": "string",
"enum": {"$ref" : "reference to a file having list of enums"}
//I want to refer to a specific enum array (say value1's array)
}
}
}
},
"required": [
"card"
]
}
列挙型ファイルは次のようである:
{
"value1": [..],
"value2": [..]
....
}