RicoSuter/NJsonSchema

Improve pretty print of validation errors

オープン

#332 opened on 2017/03/08

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)C# (549 件のフォーク)github user discovery
help wantedproject: NJsonSchema.Validationtype: enhancement

Repository metrics

Stars
 (1,581 個のスター)
PR merge metrics
 (平均マージ 39d 6h) (30d で 1 merged 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.

コントリビューターガイド