Skip to content

Object validation #84

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
merged 2 commits into from
Aug 22, 2018
Merged

Object validation #84

merged 2 commits into from
Aug 22, 2018

Conversation

p1c2u
Copy link
Collaborator

@p1c2u p1c2u commented Aug 21, 2018

Separate object validation and object unmarshalling.
Return true object (BaseModel)

@p1c2u p1c2u added area/schema Indicates an issue on schema area kind/enhancement labels Aug 21, 2018
@codecov
Copy link

codecov bot commented Aug 21, 2018

Codecov Report

Merging #84 into master will increase coverage by 0.08%.
The diff coverage is 98.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   98.26%   98.35%   +0.08%     
==========================================
  Files          54       54              
  Lines        1154     1217      +63     
==========================================
+ Hits         1134     1197      +63     
  Misses         20       20
Impacted Files Coverage Δ
openapi_core/extensions/models/models.py 100% <100%> (ø) ⬆️
openapi_core/extensions/models/factories.py 100% <100%> (ø) ⬆️
openapi_core/schema/schemas/models.py 96.9% <98.21%> (+0.37%) ⬆️
openapi_core/schema/schemas/validators.py 100% <0%> (+5.88%) ⬆️

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 17855ae...3aaa3ce. Read the comment docs.

@p1c2u p1c2u force-pushed the feature/object-validation branch 4 times, most recently from f6f6bed to dd515ec Compare August 22, 2018 08:11
@p1c2u p1c2u force-pushed the feature/object-validation branch from dd515ec to 0915e94 Compare August 22, 2018 08:34
@p1c2u p1c2u merged commit 7d1f568 into master Aug 22, 2018
@p1c2u p1c2u deleted the feature/object-validation branch August 22, 2018 09:18
@raybotha
Copy link

Does this affect #82?

@p1c2u
Copy link
Collaborator Author

p1c2u commented Aug 22, 2018

@raybotha yes it's for objects, other types still to come

@raybotha
Copy link

@p1c2u Cool, I noticed that a flat requestBody does get validated, my issue was just with strings not getting cast which I found a solution for. From what I can gather, does this PR add the validation you've had for flat bodies to those that have nested objects? Like {"foo": {"foo": "bar"}}?

@p1c2u
Copy link
Collaborator Author

p1c2u commented Aug 22, 2018

@raybotha validation is for values that were unmarshalled already so you need to pass proper object for validation. In your example will be an object with attribute foo

bjmc pushed a commit to bjmc/openapi-core that referenced this pull request Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema Indicates an issue on schema area kind/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants