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

Seeing validation issues since pulling latest dev-master #467

Closed
mmucklo opened this issue Nov 14, 2017 · 6 comments
Closed

Seeing validation issues since pulling latest dev-master #467

mmucklo opened this issue Nov 14, 2017 · 6 comments

Comments

@mmucklo
Copy link

mmucklo commented Nov 14, 2017

I had composer.json set to pull dev-master and recently updated.

I suppose that 6.0.0-dev was just merged in, however after the merge I'm seeing some issues with validation.

I don't have an example I can give you right now, but just submitting this as a data point in case anyone else is having the same or similar trouble.

@erayd
Copy link
Contributor

erayd commented Nov 14, 2017

Thanks for reporting this. Master is a development branch (and should not be deployed in production), however it shouldn't be causing validation problems. The API has changed a bit however - are the problems you're seeing API-related, or are they faults with the validation logic?

If you can provide any examples, that would be really helpful - 'issues with validation' is extremely vague, and doesn't give me enough data to reproduce whatever problem you might be encountering.

@mmucklo
Copy link
Author

mmucklo commented Nov 14, 2017

Got it - still troubleshooting and trying to find the point at which things flew south...

@mmucklo
Copy link
Author

mmucklo commented Nov 14, 2017

So the last one that worked was:

9225c96 - Revert 5.2.0 backports prior to 6.0.0 merge (#403)

https://github.com/justinrainbow/json-schema/tree/9225c967a5395e4643b5124806191c038fb1224b

When I upgrade the schema gives the following validation error:

"The property data is not defined and the definition does not allow additional properties"

@erayd
Copy link
Contributor

erayd commented Nov 14, 2017

I have tested the following against the current master, and it seems to work as intended. Could you please clarify what the problem is?

document.json

{
    "data": "someValue"
}

schema-with-data.json

{
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "data": {
            "type": "string"
        }
    }
}

schema-without-data.json

{
    "type": "object",
    "additionalProperties": false
}

Test Output

steve@neith ~/dev/json-schema $ ./bin/validate-json --verbose document.json schema-with-data.json
OK. The supplied JSON validates against the schema.
steve@neith ~/dev/json-schema $ ./bin/validate-json --verbose document.json schema-without-data.json
JSON does not validate. Violations:
[] The property data is not defined and the definition does not allow additional properties

@erayd
Copy link
Contributor

erayd commented Nov 21, 2017

@mmucklo Did you determine the cause of the problem? I can't do anything without more information; from where I'm sitting the validator appears to be working correctly. If there is a bug, I need to be able to reproduce it.

@DannyvdSluijs
Copy link
Collaborator

@mmucklo in an attempt to cleanup this repo we are trying to filter the issues and see which ones might be closed. Is it safe to assume this is a rather old issue, which seemingly was answered, and therefore can be closed? Feel free to close it yourself with some comments if helpful.

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

3 participants