Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a comment for schema validation when generating configuration files #3202

Open
mpal9000 opened this issue Oct 25, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@mpal9000
Copy link

Feature Overview

When generating files with the CLI, e.g. aqua init or aqua generate-registry a comment could be added on top of the file, for schema validation via the editor's YAML language server. The comment could be added under ---, but works above as well.

Also an additional schema for "aqua-policy.yaml" could be added to "json-schema" repo and used as above.

See:
https://aquaproj.github.io/docs/reference/config/#json-schema
https://aquaproj.github.io/docs/reference/registry-config/#json-schema

Why is the feature needed?

For better user experience when editing the configurations manually.

Workaround

No response

Example Code

aqua.yaml

---
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/aqua-yaml.json

# ...

aqua-registry.yaml

---
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/registry.json

# ...

Note

No response

@mpal9000 mpal9000 added the enhancement New feature or request label Oct 25, 2024
@suzuki-shunsuke
Copy link
Member

Thank you for your proposal.
Do you have any refefence abaout the comment # yaml-language-server: $schema=?
I'm looking for it.

@suzuki-shunsuke
Copy link
Member

I'm wondering if this comment syntax is common for editors such as VSCode, Vim, Neovim, and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants