Skip to content

Support for Declaring Schema Reference in YAML for Validation Workflows #3910

@damienjburks

Description

@damienjburks

Hello CUE team,
As a maintainer for the FINOS Common Cloud Controls (CCC) project, I’d like to propose a feature that would enable YAML files to optionally declare the schema they are intended to validate against. This would greatly benefit projects like ours that use CUE to enforce compliance and quality controls our CI/CD pipelines.

Problem Statement

In our workflows, we use CUE to validate YAML files against defined schemas as part of pre-merge and pre-release checks. However, because YAML lacks a native way to declare which schema it adheres to, we are forced to hardcode schema mappings externally or apply the same schema across multiple files. This approach that doesn’t scale well and is error-prone for our use case.

Benefits

  • Enables schema-aware tooling and automation (e.g., schema selection in CI)
  • Improves clarity and maintainability of YAML-based control files
  • Aligns with similar concepts like $schema in JSON Schema

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestNew feature or requestNeedsDesignFunctionality seems desirable, but not sure how it should look like.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions