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

Would JSON values appears in subErrors or not #260

Open
basimhennawi opened this issue Aug 7, 2017 · 0 comments
Open

Would JSON values appears in subErrors or not #260

basimhennawi opened this issue Aug 7, 2017 · 0 comments

Comments

@basimhennawi
Copy link

basimhennawi commented Aug 7, 2017

Hi, I'm wondering if there is a case existed where stack-trace in subErrors attribute in validateResult response in case of invalid JSON schema, would show the values of my JSON.

For example, I tried the following simple case which expected to fail because of invalidity of regexp of 3-digits against value 1234, and it doesn't show the 1234 value in the subErrors, which is cool for me, as follow:

If my schema looks like this:

{
    "anyOf": [{
    	"type": "object",
	"properties": {
	    "foo": {
                "type": "string",
                "pattern": "^\\d{3}$"
            }
	},
	"required": ["foo"]
    }]
}

and by JSON, to be validated, looks like this:

{
    "foo": "1234"
}

I'm asking this because I want to log the subErrors stack-trace in my validation handler on production server but the data/values inside the JSON is confidential, so afraid if there are cases that values existed in logs!

Thanks in advance! :)

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