Repository navigation
feat: JSON schemas + editor modelines for module YAML - #33
Merged
Merged
Conversation
VS Code's YAML extension guessed a schema from its store and mis-matched
template.yaml against the AWS CloudFormation SAM schema, flagging valid
fields ("Property apiVersion is not allowed"). Give both module YAML
files an explicit schema instead.
- .schema/gametemplate.schema.json — generated from the GameTemplate CRD's
openAPIV3Schema (template.yaml IS a GameTemplate CR). Regenerated from the
Gameplane repo via `make module-schema`.
- .schema/module.schema.json — hand-maintained, mirrors module-authoring.md.
- Every template.yaml/module.yaml gets a first-line
`# yaml-language-server: $schema=…` modeline. The relative ../.schema path
resolves whether this repo is opened standalone or as the modules/
submodule.
Validated: both schemas accept all 16 modules' files; the modeline is a
leading comment so build.sh's parser and validate.py's YAML load are
unaffected (.schema/ has no template.yaml, so discover_modules skips it).
Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
ValgulNecron
added a commit
that referenced
this pull request
Jul 19, 2026
The 'fix version' commits (1adc510, 7b4e7c0) were branched from PR #31 (1d153c2) and force-pushed over main, silently dropping the already-merged PR #32 (per-game CurseForge/Steam ids: ARK curseforgeGameID 83374, CS2 Workshop browse) and PR #33 (module YAML .schema/ + editor modelines). The published registry still served ark:1.0.8 / cs2:1.1.0 from that lost state, but with the pre-bump gameplaneMinVersion: 0.2.0, so a v0.2.0-beta.7 operator rejected them (0.2.0-beta.7 < 0.2.0 by semver). Merge c093ea2 (the PR #33 tip) back in to restore that work. The 3-way merge keeps main's 0.2.0 -> 0.2.0-beta.7 gameplaneMinVersion bump (incl. the minecraft-java correction) on the min-version lines and takes c093ea2's content everywhere else: ark 1.0.8 + CurseForge id, cs2 1.1.0 + Workshop, .schema/ + modelines. Republishing from here overwrites the orphan ark:1.0.8 / cs2:1.1.0 tags with the correct min-version. Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.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.
Problem
VS Code's YAML extension (
redhat.vscode-yaml) auto-guesses a schema from its store and mis-matchestemplate.yamlagainst the AWS CloudFormation SAM schema, flagging valid fields:Fix
Give both module YAML files an explicit
$schemaso the extension stops guessing — and gets real validation + autocomplete..schema/gametemplate.schema.json— generated from the GameTemplate CRD'sopenAPIV3Schema(a moduletemplate.yamlis aGameTemplatecustom resource). Regenerated from the Gameplane repo viamake module-schema..schema/module.schema.json— hand-maintained, mirrorsdocs/module-authoring.md.template.yaml/module.yaml:# yaml-language-server: $schema=../.schema/gametemplate.schema.json../.schemapath resolves whether this repo is opened standalone or as the Gameplane repo'smodules/submodule.Verification
module.yamlkey is in the schema, allrequiredpresent; everytemplate.yamlmatches the constapiVersion/kind).build.sh'symvparser still extractsname/version, andvalidate.py's YAML load is unaffected —.schema/has notemplate.yaml, sodiscover_modulesskips it.Companion
The generator +
make module-schematarget land in the Gameplane repo; the submodule pointer bump follows once this merges.🤖 Generated with Claude Code