Skip to content

WIP Add any-of #288

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

Closed
wants to merge 1 commit into from
Closed

WIP Add any-of #288

wants to merge 1 commit into from

Conversation

allcaps
Copy link
Contributor

@allcaps allcaps commented Feb 10, 2021

No description provided.

Copy link
Collaborator

@p1c2u p1c2u left a comment

Choose a reason for hiding this comment

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

I know it's WIP. Looks okay just some minor fixes needed

@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #288 (3179018) into master (8c3b23f) will decrease coverage by 0.88%.
The diff coverage is 34.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #288      +/-   ##
==========================================
- Coverage   96.75%   95.86%   -0.89%     
==========================================
  Files         122      122              
  Lines        2431     2465      +34     
==========================================
+ Hits         2352     2363      +11     
- Misses         79      102      +23     
Impacted Files Coverage Δ
...penapi_core/unmarshalling/schemas/unmarshallers.py 83.67% <26.66%> (-10.34%) ⬇️
openapi_core/schema/schemas/factories.py 98.91% <75.00%> (-1.09%) ⬇️
openapi_core/schema/schemas/models.py 98.41% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c3b23f...3179018. Read the comment docs.

@allcaps allcaps changed the title WIP Add any-off WIP Add any-of Feb 10, 2021
pass
else:
if properties is not None:
log.warning("multiple valid anyOf schemas found")
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's allowed to have many valid schemas for anyof and properties need to be added rather than replaced

@@ -529,6 +529,80 @@ def test_unambiguous_one_of(self, value, validator_factory):

assert result is None

@pytest.mark.parametrize('value', [Model(), ])
def test_object_multiple_any_of(self, value, validator_factory):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Multiple valid schemas are allowed for anyOf. It shouldn't raise error.

@philipbjorge
Copy link

@allcaps -- Really appreciate you taking this one on!

@sisp
Copy link
Contributor

sisp commented May 30, 2021

I'd love to see this PR merged. @allcaps Will you be able to finish it?

@allcaps
Copy link
Contributor Author

allcaps commented May 30, 2021

Nope, the project I was working that required any-of is canceled so I lost my funding (and motivation).

Anyone who likes to work on this, go ahead!

@sisp sisp mentioned this pull request Jun 8, 2021
@p1c2u
Copy link
Collaborator

p1c2u commented Sep 25, 2022

Closing in favor of #423

@p1c2u p1c2u closed this Sep 25, 2022
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.

4 participants