json-schema-validator icon indicating copy to clipboard operation
json-schema-validator copied to clipboard

fix the additionalProperties in oneOf failed test cases

Open stevehu opened this issue 3 years ago • 2 comments

These test cases were submitted by @huubfleuren and I just market them as disabled for now. Our developers can pick them up and get them fixed.

@huubfleuren Have you tested under version 1.0.44? Are they fail as well in 1.0.44? Thanks.

stevehu avatar Feb 22 '22 02:02 stevehu

Good one. Thanks. I did not test it on 1.0.44, but nowIi have and results differ. It is not flawless either, but where there is ambivalence this is acceptable of course. On the other hand: I think the messages are all correct:

AdditionalPropertiesOneOfFailsTest
test master 1.0.44
heightIsNotMissingNotOnceAndNotTwice() v v
chemicalCharacteristicNameIsAdditional() - -
chemicalCharacteristicCategoryNameIsDefined() v v
heightWrongType() - -
depthIsAdditional() - -
weightIsMissingOnlyOnce() - v
toxicIsAdditional() - v

the errormessages seem to be better (master: failFast=false):

master:

$.activities[0].weight: is missing but it is required $.activities[0].chemicalCharacteristic: is missing but it is required $.activities[1].weight: is missing but it is required $.activities[1].height: is missing but it is required $.activities[2].weight: is missing but it is required $.activities[2].height: is missing but it is required

1.0.44

$.activities[0].weight: is missing but it is required $.activities[0].age: is not defined in the schema and the schema does not allow additional properties $.activities[1].toxic: is not defined in the schema and the schema does not allow additional properties $.activities[2].toxic: is not defined in the schema and the schema does not allow additional properties $.activities[2].chemicalCharacteristic: should be valid to one and only one of the schemas

huubfleuren avatar Feb 22 '22 11:02 huubfleuren

@huubfleuren Thanks a lot for your detailed comparison. I think we need a code analysis between the two versions to see what has been changed for the part.

stevehu avatar Feb 22 '22 18:02 stevehu

Completed in #720

fdutton avatar Apr 20 '23 20:04 fdutton