Closed Era-cell closed 3 months ago
As I described in #732, were testing
additionalProperties
andunevaluatedProperties
here, notpropertyNames
. These tests need to be moved to the appropriate files.
H.. Actually
As I described in #732, were testing
additionalProperties
andunevaluatedProperties
here, notpropertyNames
. These tests need to be moved to the appropriate files.
Huh.. this PR is related to a different issue than issue #626. The issue #305 description says:
@Era-cell, propertyNames
is functioning as expected, but there is change in the behavior of additionalProperties
and unevaluatedProperties
for propertyNames. So because of that tests related to these properties should be included in the additionalProperties
and unevaluatedProperties
files.
but there is change in the behavior of additionalProperties and unevaluatedProperties for propertyNames.
No. There is no change in behavior. The tests are to verify that.
These look good. Please add them to 2019 and "next".
I saw just now, that the tests are present already for unevaluatedProperties from 2019 - draft-next, already. So, I have considered to add tests only for additionalProperties
but the spec could be misread that
propertyNames
defines properties thatadditionalProperties
would then skip. That's what the issue is about.So for this schema
{"propertyNames": { "maxLength": 5 }, "additionalProperties": false }
Should the data { apple: "apple" } be considered valid or not? because It appears we don't have tests for this specific case also.
Correct, { "apple": "apple" }
is an invalid instance for that schema.
We do have that test with the latest update: see line 175 in the first file.
I have updated the changes, and Thank you
Addressing the issue: 305. Also inculded "specification" property, I have added it such a way that property names cover pattern and length constraints too. Please review my PR