Repository navigation
ci: validate hw_defs JSON against hwdef_schema.json - #7872
Merged
Merged
Conversation
Both are top-level sections in every board JSON (EdgeTX#7411, EdgeTX#7383), but the schema did not list them, so every file failed validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing checked the board JSON files against the schema, so it drifted from the files and the Pydantic model unnoticed. Add a check-jsonschema step, and rename the existing step, which only checks the Pydantic model. Run the workflow when the schema or the workflow itself changes. Also add KEY_BIND to the schema's key enum to match KeyEnum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick
added a commit
that referenced
this pull request
Oct 7, 2026
The schema validation CI from #7872 rejects the status_led_rgb_strip and status_led_pwm_timer* keys this branch adds to the leds block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes:
tools/hwdef_schema.jsonwas never checked against the board JSON files, so it drifted from them and from the Pydantic model without anyone noticing. Before this PR every board JSON failed validation against it.hapticandkey_lock_combosections to the schema. Every board JSON has had these since chore: use settings from radio JSON files instead of hal.h #7411 and feat(radio): optional key lock feature #7383, but the schema did not list them.key_lock_comboreuses the key enum and requires exactly two distinct keys, matching the check inmodels.py.KEY_BINDto the schema's key enum to matchKeyEnuminmodels.py.validate_hw_defs.yml:check-jsonschemastep that validates every file inradio/src/boards/hw_defs/against the schema (the sameuvx check-jsonschemaapproach asvalidate_cmake_presets.yml)Tested locally: all board JSONs pass both the schema and the Pydantic checks, and the workflow file passes GitHub's workflow schema.
🤖 Generated with Claude Code