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

Check that authored YAML conforms to a schema before processing #1720

Open
ddbeck opened this issue Sep 2, 2024 · 0 comments
Open

Check that authored YAML conforms to a schema before processing #1720

ddbeck opened this issue Sep 2, 2024 · 0 comments
Labels
enhancement New feature or request tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings

Comments

@ddbeck
Copy link
Collaborator

ddbeck commented Sep 2, 2024

Declaring a schema for authored files (with internal-only fields like draft_date and compute_from) and validating files against it would prevent certain kinds of mistakes, like setting compute_from instead of status.compute_from. See https://github.com/web-platform-dx/web-features/pull/1703/files#r1741081696 for an example of the kind of error I would like to catch.

I wonder if using a type validation library, like zod, would help here. We do some ad-hoc validation, but nothing comprehensive.

@ddbeck ddbeck added enhancement New feature or request tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings labels Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings
Projects
None yet
Development

No branches or pull requests

1 participant