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

flatten command - prune oneOf field on circular references #466

Merged
merged 2 commits into from
Dec 26, 2023

Conversation

tcdsv
Copy link
Collaborator

@tcdsv tcdsv commented Dec 24, 2023

issue: #465

Conditions for pruning the 'oneOf' field:

  • The schema being merged is a child of another schema, through the oneOf field.
  • In the unmerged schema, the parent schema is nested within the 'allOf' array, creating a circular reference
  • The 'oneOf' field in both the parent and child schemas is identical.
  • The parent schema contains a non-empty propertyName discriminator field

@tcdsv tcdsv marked this pull request as draft December 24, 2023 06:50
@tcdsv tcdsv marked this pull request as ready for review December 24, 2023 07:01
@codecov-commenter
Copy link

codecov-commenter commented Dec 24, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (593bd07) 83.76% compared to head (66135d8) 83.75%.
Report is 1 commits behind head on main.

Files Patch % Lines
flatten/merge_allof.go 87.50% 3 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #466      +/-   ##
==========================================
- Coverage   83.76%   83.75%   -0.01%     
==========================================
  Files         217      217              
  Lines       12550    12593      +43     
==========================================
+ Hits        10512    10547      +35     
- Misses       1663     1668       +5     
- Partials      375      378       +3     
Flag Coverage Δ
unittests 83.75% <87.50%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@reuvenharrison reuvenharrison merged commit d7c8034 into Tufin:main Dec 26, 2023
5 checks passed
effoeffi added a commit to oasdiff/oasdiff that referenced this pull request Feb 1, 2024
* add flag to control colorful output (Tufin#433)

* Bump github.com/oasdiff/go-common from 0.2.27 to 0.2.28 (Tufin#444)

* color-flag completion (Tufin#447)

* Bump cloud.google.com/go from 0.110.10 to 0.111.0 (Tufin#448)

* prevent---color-with-non-text-formats (Tufin#449)

* upgrade-to-kin-openapi-v0.122.0 (Tufin#450)

* diff-add-exclude-elements-options (Tufin#454)

* remove-hardcoded-quotes (Tufin#455)

* Correct int messages (Tufin#456)

* fix test (Tufin#457)

* add qr code (Tufin#458)

* typo

* github-annotations-with-api (Tufin#452)

* add source file to github (Tufin#459)

* Change sample sunset date to self-explain that it's YYYY-MM-DD format (Tufin#460)

* github-avoid-http-files (Tufin#462)

* Update ALLOF.md

* flatten command - fix wrong Title and Description values (Tufin#464)

* flatten command - prune oneOf field on circular references (Tufin#466)

* lower-min-go-ver (Tufin#471)

* update Breaking Changes to Enum Values

* Bump cloud.google.com/go from 0.111.0 to 0.112.0 (Tufin#472)

* delta (Tufin#473)

* add property name to the response's type/format change message (Tufin#477)

* documentation (Tufin#478)

* Update DELTA.md (Tufin#480)

---------

Co-authored-by: Reuven Harrison <rh@tufin.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: effoeffi <effoeffi@gmail.com>
Co-authored-by: Maciej Lewiński <maciej@lewinski.dev>
Co-authored-by: Omer E <33223663+tcdsv@users.noreply.github.com>
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