-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: add schema tests and official JSON Schema #94
base: main
Are you sure you want to change the base?
Conversation
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.
Looks good! 👍
schemas/v1.0/schema.yaml
Outdated
allOf: | ||
- description: The `update` field has no impact if the `remove` field of this | ||
action object is true. | ||
if: | ||
properties: | ||
remove: | ||
const: true | ||
required: | ||
- remove | ||
then: | ||
not: | ||
required: | ||
- update |
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.
This is stricter than the specification, which allows update
together with remove: true
.
I'd rather remove this, and also remove the test case fail/actions-no-update-with-remove.yaml
.
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.
i asked for clarification on this in #71
I think allowing this in the schema introduces an ambiguous implementation detail.. does the remove
apply first, or the update
? Specifically because the spec indicates actions should be performed in order
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.
Let's wait for the outcome of #71 then with merging this PR.
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.
The schema validator we use thinks this allOf
construct is invalid.
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.
when I removed the description, i missed the array syntax was removed. That's why we have tests! 👍
979384c
to
3111890
Compare
d1907bc
to
84db575
Compare
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.
Almost there, only minor nits.
Thank you!
@jeremyfiel Could you please add a That's the only part of the schema that is not yet tested. |
dc198e7
to
5517ebc
Compare
should be all covered now |
Sorry, should have been more precise: please add to a "pass" test case, the "fail" ones don't count into the schema coverage. |
* fixup `target` json path
5517ebc
to
4b9a9d2
Compare
includes pass and fail scenarios for Overlay schema tests.
Also includes the full schema per #72