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

Schema validation fails before the ${{env.*}} parameters have been removed #583

Closed
vordimous opened this issue Nov 20, 2023 · 1 comment · Fixed by #751
Closed

Schema validation fails before the ${{env.*}} parameters have been removed #583

vordimous opened this issue Nov 20, 2023 · 1 comment · Fixed by #751
Assignees
Labels
bug Something isn't working

Comments

@vordimous
Copy link
Contributor

Describe the bug
the json schema does not check for the presence of env variables ${{env.*}} in the zilla.yaml and invalidates fields that aren't expecting strings.

To Reproduce
Steps to reproduce the behavior:

  1. open a zilla.yaml in vscode with ${{env.*}} defined in a number field and it will have an error shown
@jfallows jfallows added the bug Something isn't working label Dec 22, 2023
@jfallows
Copy link
Contributor

jfallows commented Jan 15, 2024

We need to programmatically annotate the zilla schema to explicitly support ${{...}} expression strings for all object property values, whether string or not, and check this schema first on the input config text.

We should also show this annotated schema when verbose schema config is set, so we can output it and use it for VS Code.

Then we should validate using the original (non-annotated) schema after replacing the ${{env...}} expressions with environment variable values, to make sure the replaced values still honor the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants