-
Notifications
You must be signed in to change notification settings - Fork 391
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
add additionalProperties: false to objects #435
Conversation
Seeing a speccheck failure for get-block-by-hash response after this - https://www.jsonschemavalidator.net/s/60jyjLPr Can discuss specific failures here if the test workflow can be approved please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @anukul thanks for working on this! Would love to see this merged. The issue is a bit deceiving though I think, because the task is a bit more difficult than simply marking every method additionalProperties: false
.
When this is marked on the schema and additional values are disallowed, many test values stop validating against the spec. You can see in the CI result for speccheck
. The output could use some work, but last two lines are the important ones. The last line is the json value that failed validation and the second to last line is the schema it failed to validate against.
Here is what it is currently failing on: https://www.jsonschemavalidator.net/s/VPmC37j8
It appears to be an issue with how transactions are represented within blocks. There are extra fields like blockHash
, blockNumber
, etc. These fields are defined in TransactionInfo
, but not SignedTransaction
, which is what Block
is currently using. I think it should be using TransactionInfo
instead.
Hopefully this is helpful - let me know if you have any questions. The bulk of the work for resolving this issue will be working though the speccheck errors and updating the schema so that it matches exactly the test cases.
This reverts commit 4630b51.
…remove additionalProperties from child schemas
Right, thanks a lot for reviewing. After changing I took the approach of setting it everywhere and running Also attempted to fix two other reported errors:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just a few comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Glad to finally close this issue.
Closes #63