diff options
author | Chad Smith <chad.smith@canonical.com> | 2022-05-26 15:08:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 15:08:10 -0600 |
commit | 371f6468eed7dad0ee9710880239b62025797318 (patch) | |
tree | 0463e4404c40685832a131a7a46695a1c5a9b2e6 /.vscode | |
parent | 112746cb060c8d3ce182a9e0abdc4cda961abf5a (diff) | |
download | cloud-init-git-371f6468eed7dad0ee9710880239b62025797318.tar.gz |
schema: write_files defaults, versions $ref full URL and add vscode (#1479)
schema: write_files defaults, versions $ref full URL and add vscode
* Set write_files.permissions and content defaults the correct "string"
data type. This aids in vscode auto-completion which injects default
values for defined cloud-config keys.
* Make the $ref URI a full URL to our schema-cloud-config-v1.json
JSON schema Draft-04 does not support relative $ref URLs which
prevents validators like https://www.jsonschemavalidator.net/
from parsing our versions schema with the error:
Error when resolving schema reference './schema-cloud...json'.
* Add vscode exstentions for validatating #cloud-config YAML
Developers using the cloud-init repo are likely to also
want to create #cloud-config YAML files for development. Provide
the suggested YAML extension in .vscode/extensions.json.
This YAML extension will prompt vscode developers with the
following message upon opening the cloud-init repo:
'YAML' extension is recommended for this repository. Do you want
to install?
This RedHat YAML extension sources public schemas from
https://schemastore.org and will treat the following file formats
as #cloud-config files:
cloud-init.yaml
cloudinit.yaml
*.cloud-init.yaml
*.cloudinit.yaml
Any filenames matching those formats will get automatic validation
against cloud-config schema and auto-complete known #cloud-config
keys.
Diffstat (limited to '.vscode')
-rw-r--r-- | .vscode/extensions.json | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..6098b6eb --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "redhat.vscode-yaml" + ] +} |