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

fix: Make the recipe pass validation for new users #45

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

gmpinder
Copy link
Member

@gmpinder gmpinder commented Dec 4, 2024

No description provided.

@gmpinder gmpinder self-assigned this Dec 4, 2024
@fiftydinar fiftydinar merged commit 6913849 into main Dec 4, 2024
2 checks passed
@fiftydinar fiftydinar deleted the fix-default-recipe-validation branch December 4, 2024 22:04
@xynydev
Copy link
Member

xynydev commented Dec 5, 2024

I think empty configs shouldn't mess up validation; maybe something we can fix in the TypeSpec?

@gmpinder
Copy link
Member Author

gmpinder commented Dec 5, 2024

I think empty configs shouldn't mess up validation; maybe something we can fix in the TypeSpec?

They would have to support null on the properties that are optional. One of our users ran into that problem

@xynydev
Copy link
Member

xynydev commented Dec 6, 2024

Maybe the issue is only with null arrays being possible parsed as existing non-array values, failing the validation. We could try making optional strings explicitly also support a null or empty string value.

@xynydev
Copy link
Member

xynydev commented Dec 6, 2024

I tested locally; adding an optional array key without defining an error gives an incorrect type error. We could allow an empty string in the schemas, but that might break parsing in some cases. A valid alternative, however, would be declaring empty arrays and objects with key: {} and key: [].

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

Successfully merging this pull request may close these issues.

3 participants