Skip to content

Any schema type #73

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 23, 2018
Merged

Any schema type #73

merged 2 commits into from
Aug 23, 2018

Conversation

p1c2u
Copy link
Collaborator

@p1c2u p1c2u commented Aug 2, 2018

Related to #36
It's a first step to support oneof

@p1c2u p1c2u mentioned this pull request Aug 2, 2018
@codecov
Copy link

codecov bot commented Aug 2, 2018

Codecov Report

Merging #73 into master will increase coverage by 0.02%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   98.22%   98.24%   +0.02%     
==========================================
  Files          54       54              
  Lines        1238     1253      +15     
==========================================
+ Hits         1216     1231      +15     
  Misses         22       22
Impacted Files Coverage Δ
openapi_core/schema/schemas/enums.py 100% <100%> (ø) ⬆️
openapi_core/schema/schemas/factories.py 100% <100%> (ø) ⬆️
openapi_core/schema/schemas/exceptions.py 100% <100%> (ø) ⬆️
openapi_core/schema/schemas/models.py 96.41% <92.85%> (+0.16%) ⬆️

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 4731504...0cbbdb0. Read the comment docs.

@p1c2u p1c2u force-pushed the feature/any-schema-type branch from 5879e18 to 5fec41f Compare August 2, 2018 19:15
@smarlowucf
Copy link
Contributor

smarlowucf commented Aug 3, 2018

Looks good. Should allOf/oneOf have types? https://github.com/p1c2u/openapi-core/pull/73/files#diff-431dcafe8bb0f93322e443187632f52fR198

Looking at examples this is not the case https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/.

For #65 I tested using type: string like:

utctime:
  type: string
  oneOf:
    - type: string
      enum: [always, now]
    - type: string
      format: date-time

This passed validation in openapi-core but plugging it into swagger-ui yeilds a convoluted data structure.

@p1c2u
Copy link
Collaborator Author

p1c2u commented Aug 4, 2018

That's why I didn't merge it still. I'm not 100% sure how it should work.

I need to add one change to any type unmarshaling.

@p1c2u p1c2u added WIP Work in progress area/schema Indicates an issue on schema area labels Aug 16, 2018
@p1c2u p1c2u force-pushed the feature/any-schema-type branch from 5fec41f to 552827e Compare August 17, 2018 18:34
@p1c2u p1c2u force-pushed the feature/any-schema-type branch from 552827e to cf53e19 Compare August 22, 2018 13:29
@p1c2u
Copy link
Collaborator Author

p1c2u commented Aug 22, 2018

This PR won't resolve #65 . It needs separate PR.

@p1c2u p1c2u force-pushed the feature/any-schema-type branch 2 times, most recently from d958fe8 to 28d4d0b Compare August 23, 2018 08:15
@p1c2u p1c2u force-pushed the feature/any-schema-type branch from 28d4d0b to 0cbbdb0 Compare August 23, 2018 08:29
@p1c2u p1c2u merged commit 632eb3e into master Aug 23, 2018
@p1c2u p1c2u deleted the feature/any-schema-type branch August 23, 2018 08:40
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 WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants