RicoSuter/NJsonSchema

Improve pretty print of validation errors

开放

#332 创建于 2017年3月8日

 (0 条评论) (0 个反应) (0 位负责人)C# (549 个派生)github user discovery
help wantedproject: NJsonSchema.Validationtype: enhancement

仓库指标

星标
 (1,581 个星标)
PR 合并指标
 (平均合并 39天 6小时) (30 天内合并 1 个 PR)

描述

Let's say an allOf clause is violated because there is a required property missing. Currently, if we iterate through errors, we are getting:

"NotAllOf: #/\n{\n  PropertyRequired: #/someproperty\n}\n{\n}\n"

This structure is not easily processable, and not very pretty to print. It would be great if we could build something like:

{
	"NotAllOf": {
		"PropertyRequired": "#/someproperty"
	}
}

I have not seen a way to iterate through nested errors in order to achieve this.

贡献者指南