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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge nested allof #2729

Merged
merged 3 commits into from
Feb 15, 2024
Merged

Merge nested allof #2729

merged 3 commits into from
Feb 15, 2024

Conversation

niclim
Copy link
Contributor

@niclim niclim commented Feb 12, 2024

馃崡 Description

What does this PR do? Anything folks should know?

This PR merges nested allOf keys (e.g. allOf: [ { allOf: [...] } ])

This PR also changes how we handle invalid allOf definitions. Instead of ignoring the allOf if there's a type: string and not flattening allOf, we ignore the type: string variant and flatten the rest (assuming there is an object). I think this is likely a better user experience, especially downstream in the rest of our app (e.g. allOf is assumed to not be there, and if it's invalid we'll get things like "every key in the allOf is removed" rule errors).

TODO

  • Surface reason / errors / warnings as part of denormalizing

馃摎 References

Links to relevant docs (Notion, Twist, GH issues, etc.), if applicable.

馃懝 QA

How can other humans verify that this PR is correct?

@niclim niclim marked this pull request as ready for review February 13, 2024 14:09
Copy link
Member

@acunniffe acunniffe left a comment

Choose a reason for hiding this comment

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

Yeah this makes sense. And if we did anything else, I think we'd do validation about teams defining conflicting types

@niclim niclim added this pull request to the merge queue Feb 15, 2024
Merged via the queue into main with commit 4dc442d Feb 15, 2024
3 checks passed
@niclim niclim deleted the merge-nested-allof branch February 15, 2024 15:04
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