RicoSuter/NJsonSchema

Improve pretty print of validation errors

Ouverte

#332 ouverte le 8 mars 2017

 (0 commentaire) (0 réaction) (0 personne assignée)C# (550 forks)github user discovery
help wantedproject: NJsonSchema.Validationtype: enhancement

Métriques du dépôt

Stars
 (1 581 étoiles)
Métriques de merge PR
 (Merge moyen 39j 6h) (1 PR mergée en 30 j)

Description

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.

Guide contributeur