Closed jvc26 closed 11 years ago
Slightly confusing behaviour:
Passes as expected
schema = { "patternProperties": { "[a-c]": { "properties": { "cellid": { "type": "integer"} }, "additionalProperties": False, } } } string = """{"c": { "cellid": 1}}""" data = json.loads(string) validictory.validate(data, schema)
Should pass, but doesn't
schema = { "patternProperties": { "[a-c]": { "properties": { "cellid": { "type": "integer"} }, "additionalProperties": False, } }, "additionalProperties": False, } string = """{"c": { "cellid": 1}}""" data = json.loads(string) validictory.validate(data, schema)
Should fail, but doesn't
schema = { "patternProperties": { "[a-c]": { "properties": { "cellid": { "type": "integer"} }, "additionalProperties": False, } }, "additionalProperties": False, } string = """{"d": { "cellid": 1}}""" data = json.loads(string) validictory.validate(data, schema)
Does additionalProperties therefore not match patternProperties?
additionalProperties
I've tested sunlightlabs/validictory#42, and it looks like @juanmb has fixed the issues with his Pull request.
Slightly confusing behaviour:
Passes as expected
Should pass, but doesn't
Should fail, but doesn't
Does
additionalProperties
therefore not match patternProperties?I've tested sunlightlabs/validictory#42, and it looks like @juanmb has fixed the issues with his Pull request.