Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better error reporting: report with dump of failed object #6

Open
glensc opened this issue Mar 7, 2019 · 0 comments
Open

Add better error reporting: report with dump of failed object #6

glensc opened this issue Mar 7, 2019 · 0 comments

Comments

@glensc
Copy link

glensc commented Mar 7, 2019

I have top level as array, and in such case error reporting reports numeric index, which is rather hard to follow down (have count manually).

What would improve, is to dump that record to error, to be able to identify the failing node better.

$ pajv validate -s schema.json -d services.yml
services.yml invalid
[ { keyword: 'pattern',
    dataPath: '[63].slug',
    schemaPath: '#/items/properties/slug/pattern',
    params: { pattern: '^[a-z0-9][a-z0-9/.-]+$' },
    message: 'should match pattern "^[a-z0-9][a-z0-9/.-]+$"' } ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant