1
我现在的JSON模式定义是这样的JSON模式使产权条件必需
{
"properties": {
"account_type": {
"description": "account type",
"enum": [
"CURRENT",
"SAVINGS",
"DEMAT"
],
"type": "string"
},
"demat_account_number": {
"description": "demat_account_number",
"type": "string"
}
},
"required": [
"account_type"
],
"type": "object"
}
我的要求是,如果“ACCOUNT_TYPE” =“DEMAT”,然后“demat_account_number”应该成为一个必需的属性。
有什么办法可以实现这种验证?
作品...谢谢! –