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

validate merge result vs individual overrides #532

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Jan 17, 2024

An override file doesn't need to respect all json schema rules, as long as the merge result is correct
This PR changes the logic so we validate merged model. Doing so we can use a partial compose.override.yaml file but still will detect incorrect usage as this validation will take place after each and every merge (including the first compose.yaml file load)

this PR changes:
grouping x-* fields into #extensions only takes place just before we map to go struct. yaml dict uses the plain extension fields. For this purpose, mapstructure annotations is updated to omit empty Extensions attribute(s)

@ndeloof ndeloof force-pushed the validation branch 2 times, most recently from af061d7 to e150b9f Compare January 17, 2024 14:25
Copy link
Collaborator

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

@ndeloof ndeloof merged commit 4374750 into compose-spec:main Jan 17, 2024
8 checks passed
@ndeloof ndeloof deleted the validation branch January 17, 2024 20:17
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.

2 participants