Closed jrdnbradford closed 8 months ago
I see this can be resolved with "additionalProperties": false
. I'll close this issue!
Yep, this is just a matter of what the cloudbuild schema defines. I couldn't tell you what the schema should be, but I see you've taken the initiative to file a PR on schemastore! ( :rocket: )
Releases of check-jsonschema
vendor the files from schemastore to allow for offline validation and more consistent behavior. So if your changes get merged, feel from to drop a note here to ask for an update+release. Otherwise, it will roll out eventually as part of the normal update/release cadence.
Awesome, my PR https://github.com/SchemaStore/schemastore/pull/3561 got merged. No need for an immediate update/release. I suspect I may provide a few other updates to the Cloud Build schema in the future. Just found about this whole schema validation thing this morning and think it's a great testing tool for my Cloud Build deployments.
Thanks for maintaining. 🥇
I put in a much more significant PR (https://github.com/SchemaStore/schemastore/pull/3563) for the Cloud Build schema. Check it out.
If merged, this and my previously merged PR probably warrant an update+release. 🦖
@sirosen thanks for the assist on https://github.com/SchemaStore/schemastore/pull/3563! This is going to speed up my work in Google Cloud quite a bit.
I've just released v0.28.0 (with some other features as well) which includes the latest version of the Cloud Build schema. Let me know if you see any issues using it!
@sirosen awesome! In addition to schema updates I also threw in some tests over there. Feel free to @ me for upstream Cloud Build issues.
I am utilizing
0.27.3
withpre-commit
to run thecheck-cloudbuild
hook:Validation doesn't appear to occur for child property names. For instance, it rightfully catches 2 errors in the following
yaml
:It will even catch if the required
steps
is misspelled:But it does not catch misspelling of optional child properties under
steps
:I had presumed that validation would catch
nam
(name
),dr
(dir
),watFor
(waitFor
) andags
(args
). These are listed as possible values in the Cloud Build Schema understeps
. Is this expected behavior, or am I missing something?