Skip to content

Fix required in composition #16

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

Merged

Conversation

sebastianmika
Copy link
Contributor

@sebastianmika sebastianmika commented Jun 24, 2021

This would close #14 and #15 at the expense of only being able to validate required and readOnly/writeOnly combinations when the required is defined on the same schema as the readOnly/writeOnly property.

Personally I would find that more balanced, esp. since readOnly and writeOnly seem to have been dropped from the latest 3.1.0 OpenAPI specs (cf. OAI/OpenAPI-Specification#1622).

That being said, it might even be more consequent to just resort back to the jsonschema.validators.required.

Sebastian Mika added 2 commits June 24, 2021 19:20
…rty is defined on the same sub-schema as the required

Clean up some flake8 issues
@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #16 (b106d9c) into master (185112b) will increase coverage by 5.13%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
+ Coverage   59.89%   65.02%   +5.13%     
==========================================
  Files           6        6              
  Lines         182      183       +1     
==========================================
+ Hits          109      119      +10     
+ Misses         73       64       -9     
Impacted Files Coverage Δ
openapi_schema_validator/_validators.py 50.00% <85.71%> (+16.10%) ⬆️

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 185112b...b106d9c. Read the comment docs.

@sebastianmika
Copy link
Contributor Author

Hi - any chance to get this merged and if yes, any ETA? Else I would consider moving to a private fork, because the issue described here and in #14 is posing regular issues in our production systems.

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.

LGTM

@p1c2u p1c2u merged commit 8a91bfb into python-openapi:master Dec 28, 2021
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.

Exception when validating schema with required in oneOf
2 participants