Skip to content

"oneOf" keyword not supported #37

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
diogobaeder opened this issue May 17, 2018 · 4 comments
Closed

"oneOf" keyword not supported #37

diogobaeder opened this issue May 17, 2018 · 4 comments

Comments

@diogobaeder
Copy link

Unfortunately this library doesn't support "oneOf", which is fundamental for using flexible/union types. The standard describes this part of the specification, but this library doesn't implement it.

Please let me know if you need help with implementing this.

@diogobaeder
Copy link
Author

Thanks a lot! :-)

@diogobaeder
Copy link
Author

Guys, I'm still having issues with oneOf; This doesn't work for me, for example:

          oneOf:
            - {type: string}
            - {type: integer}

and it just throws an error when validating an integer like 22:

openapi_core.schema.media_types.exceptions.InvalidMediaTypeValue: Value of 22 not an object

@piotr-dobrogost
Copy link

and it just throws an error when validating an integer like 22:

I think you are observing bug raised in issue #65 (oneOf type forced to object )

@diogobaeder
Copy link
Author

Not sure if it's the same; The issues I'm facing with oneOf now are related to mixing different primitives and lists of them.

If it is indeed the same, though, then this pull request might fix it: #133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants