RicoSuter/NJsonSchema
NJsonSchema reports validation error on a missing constrained but not required array
开放
#742 创建于 2018年7月11日
help wantedtype: bug
仓库指标
- 星标
- (1,581 个星标)
- PR 合并指标
- (平均合并 39天 6小时) (30 天内合并 1 个 PR)
描述
Hi,
I am using NJosnSchema to validate json events for an API. One of schemas provided by API is this. Note it has an array field 'prohibited' which is NOT marked as required, but has a constraint imposed on it - if it's present, it must have at least one item.
Now, I try to validate this json using that schema - and it presents me with a validation error:
ArrayExpected: #/message.prohibited
I'd expect that should not be the case?