Skip to content

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

@mpal9000

Description

@mpal9000

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions