Skip to content

Add anyOf #354

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 8 commits into from
Closed

Add anyOf #354

wants to merge 8 commits into from

Conversation

sisp
Copy link
Contributor

@sisp sisp commented Jun 8, 2021

This is a continuation of #288 (thanks to @allcaps for your work).

I've addressed @p1c2u's comments in #288 and updated the branch to the latest state of master. Any feedback is most welcome. 🙂

@codecov
Copy link

codecov bot commented Jun 8, 2021

Codecov Report

Merging #354 (c6dd04b) into master (bf2f13d) will decrease coverage by 0.81%.
The diff coverage is 92.85%.

❗ Current head c6dd04b differs from pull request most recent head 2b05067. Consider uploading reports for the commit 2b05067 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
- Coverage   96.72%   95.91%   -0.82%     
==========================================
  Files          80       80              
  Lines        1743     1714      -29     
==========================================
- Hits         1686     1644      -42     
- Misses         57       70      +13     
Impacted Files Coverage Δ
openapi_core/schema/schemas.py 100.00% <ø> (ø)
...penapi_core/unmarshalling/schemas/unmarshallers.py 92.89% <92.85%> (-0.86%) ⬇️
openapi_core/contrib/falcon/responses.py 92.30% <0.00%> (-7.70%) ⬇️
openapi_core/contrib/django/__init__.py 100.00% <0.00%> (ø)
openapi_core/contrib/django/requests.py 100.00% <0.00%> (ø)
openapi_core/contrib/falcon/handlers.py 100.00% <0.00%> (ø)
openapi_core/contrib/django/responses.py 100.00% <0.00%> (ø)
openapi_core/contrib/falcon/middlewares.py 100.00% <0.00%> (ø)
openapi_core/contrib/django/middlewares.py
openapi_core/contrib/django/handlers.py
... and 4 more

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 bf2f13d...2b05067. Read the comment docs.

@sisp
Copy link
Contributor Author

sisp commented Jun 13, 2021

@p1c2u Could you please review this PR? Do you insist on covering the two currently uncovered sections? The equivalent sections for unmarshaling oneOf in ObjectUnmarshaller::_unmarshal_object are not covered either at the moment.

@sisp
Copy link
Contributor Author

sisp commented Jun 30, 2021

@p1c2u Tests are passing now. Would you mind doing a review?

@p1c2u p1c2u mentioned this pull request Sep 25, 2022
@p1c2u
Copy link
Collaborator

p1c2u commented Sep 25, 2022

Closing in favor of #423
Thank you all for your contribution.

@p1c2u p1c2u closed this Sep 25, 2022
@sisp sisp deleted the any-of branch September 25, 2022 10:23
@@ -182,59 +190,51 @@ def unmarshal(self, value):
else:
return self._unmarshal_object(value)

def _clone(self, schema):
return ObjectUnmarshaller(
Copy link
Collaborator

@p1c2u p1c2u Sep 25, 2022

Choose a reason for hiding this comment

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

@sisp can you explain me please more why you create new unmarshaller with new schema but with old validator and formatter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I believe it's better to use the SchemaUnmarshallersFactory instead. Not sure why I hadn't thought of that at the time.

I've created a PR: #425

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks

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