0
我想用json模式定義可重用的枚舉類型(輸入爲phoenixnap/springmvc-raml-plugin)。json模式中可重複使用的枚舉類型
{
"$schema": "http://json-schema.org/schema",
"definitions": {
"MyEnum": {
"type": "object",
"javaType": "foo.bar.MyEnum",
"properties": {
"Value": { "enum": [ "OPT_1", "OPT_2" ] }
},
"required": ["Value"]
}
}
}
是否有方法來定義沒有「Value」屬性的模式並直接使用枚舉值?與頂級枚舉