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

pretty print errors #105

Open
dyoder opened this issue Dec 2, 2017 · 2 comments
Open

pretty print errors #105

dyoder opened this issue Dec 2, 2017 · 2 comments

Comments

@dyoder
Copy link
Member

dyoder commented Dec 2, 2017

Right now, JSCK produces errors like this:

[ { schema:
     { pointer: '#/definitions/cors/anyOf',
       attribute: 'anyOf',
       definition: [Object] },
    document: { pointer: '#/aws/cors', path: 'aws.cors', value: 'default' } } ]

We should be able to add a pretty printing capability for these errors.

@automatthew
Copy link
Contributor

YAML!

@automatthew
Copy link
Contributor

What would the API for this look like? Current usage:

{valid, errors} = jsck.validate(stuff)

Should the errors thing be an object with a prettyPrint method?

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

2 participants