feat: add input-config JSON schemas with editor association - #946
Merged
Conversation
- Commit draft 2020-12 schemas for each command config and the pipeline under `packages/schemas`, named `input-config-<command-or-flavor>` so the category is legible and inputs and outputs can follow the same scheme. - Accept a top-level `$schema` association key in a per-command config: the loader strips it before the strict merge, and the generated command schema declares it so an editor validating a config that carries it does not flag it against `additionalProperties: false`. - Guard the committed schemas against drift by regenerating them in a test and comparing.
Add a `yaml-language-server` modeline to each example pointing at its committed schema on the `rust` branch, so an editor gives completion, hover documentation, and inline validation. A JSON config, which cannot carry a comment, uses a top-level `$schema` key with the same URL instead.
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.
packages/schemas, namedinput-config-<command-or-flavor>$schemakey in per-command configs, stripping it before the strict merge and declaring it in the generated command schemas so editors do not flag ityaml-language-servermodeline pointing at therustbranch, with the$schemakey documented for JSON configsdata/README.mdandpackages/schemaseditor-support docs for the modeline