Skip to content
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

REST API - "oneof" validation #2132

Closed
florian-hoenicke opened this issue Mar 9, 2021 · 4 comments · Fixed by #2146
Closed

REST API - "oneof" validation #2132

florian-hoenicke opened this issue Mar 9, 2021 · 4 comments · Fixed by #2146
Assignees
Labels
area/core This issue/PR affects the core codebase status/done This issue is complete. type/maintenance This issue is not a bug or a feature_request.

Comments

@florian-hoenicke
Copy link
Member

The behavior of the oneof type in the protobuf definition can not be mapped to pydantic models.
There are request to address this issue:
pydantic/pydantic#656
pydantic/pydantic#619

As long as this feature does not exist, we should make our custom solution.

Please validate the request to check that the client obeys the oneof rules.

@florian-hoenicke florian-hoenicke mentioned this issue Mar 9, 2021
3 tasks
@FionnD
Copy link
Contributor

FionnD commented Mar 9, 2021

Good morning @florian-hoenicke ! 🌤️

Is this a ticket for the future, or is it only related to the issue #2104 ?

@florian-hoenicke
Copy link
Member Author

Hi @FionnD ! Yes this is something for the future. It was out of scope for that pr.

@FionnD
Copy link
Contributor

FionnD commented Mar 9, 2021

Cool, I have added it to the product backlog. :)

@FionnD FionnD added area/core This issue/PR affects the core codebase status/available The issue is available for someone to begin working on. type/maintenance This issue is not a bug or a feature_request. labels Mar 9, 2021
@deepankarm
Copy link
Member

This is a little complex to handle as oneof is not implemented with Pydantic. I've started a discussion with my current implementation for this with the Pydantic team - pydantic/pydantic#2504

@FionnD FionnD added status/done This issue is complete. and removed status/available The issue is available for someone to begin working on. labels Mar 12, 2021
@deepankarm deepankarm self-assigned this Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase status/done This issue is complete. type/maintenance This issue is not a bug or a feature_request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants