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

Allow set type defaults when override a parent value #89

Merged
merged 5 commits into from
Apr 4, 2023

Conversation

spinillos
Copy link
Member

Fixes type case from this issue: https://github.com/grafana/schematization-and-as-code-project/issues/56

It changes the way to set defaults like enums using #Type & (*"value" | _).

@spinillos spinillos requested a review from sdboyer March 21, 2023 13:05
Copy link
Member Author

@spinillos spinillos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is the same than the other enum PR. We need to update one of the PRs when the other is merged.

@spinillos spinillos changed the title Allow set enum defaults when override a parent value Allow set type defaults when override a parent value Mar 21, 2023
testdata/fields_with_default_types.txtar Outdated Show resolved Hide resolved
@spinillos spinillos marked this pull request as draft March 27, 2023 08:55
@spinillos spinillos marked this pull request as ready for review March 30, 2023 08:16
Copy link
Contributor

@sdboyer sdboyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sdboyer sdboyer merged commit 7257adf into main Apr 4, 2023
@sdboyer sdboyer deleted the fix-type-default-overrides branch April 4, 2023 09:34
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.

None yet

2 participants