oneof response bodies #902
SebastianEngelmann
started this conversation in
General
Replies: 1 comment 2 replies
-
@SebastianEngelmann There are 2 ways around this question.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a question regarding the response body. My API endpoint, which I created with actix-web, returns either struct a or struct b. Is there a way to model this with utoipa? I would need something like OneOf. Unfortunately I have not found an example in the docs. The code block is about lines 5 and 6.
Is there a way I can tell swagger to return either struct a or struct b?
Beta Was this translation helpful? Give feedback.
All reactions