-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
additionalProperties is tested and implemented incorrectly #321
Comments
I've started looking at this. The issue occurs whenever you have a property name in the data that matches a property defined on your |
@iainbeeston Unless I'm mistaken, you should never be defining properties on |
This schema is being used by these tests. This schema doesn't make sense to me. My understanding is that
additionalProperties
is supposed to be a boolean valuefalse
or a schema describing what each additional property's value should validate against.The reason these tests are concerning is because they fail when I tried to fix the following bit in
AdditionalPropertiesAttribute
, which reads:What I believe this line should do is instantiate a new schema using the value of the
additionalProperties
object, but we're trying to access[key]
on it. This demonstrates why this is a problem:With backtrace:
I want to say this is wrong, but I'm not exactly sure how I should go about fixing something like this. It seems like it would change behavior if people relied on it working the way it is tested. Here's the commit I blamed this back to: 7fba5303
The text was updated successfully, but these errors were encountered: