How to represent dynamic type in response body ? #4427
|
Hello, guys! thanks for your contribution! I am new to OpenAPI, hope you guys can help me to understand this question: I have a legacy API like this:
for example:
while and there are many other types ... |
Answered by
handrews
Mar 13, 2025
Replies: 2 comments 1 reply
|
If you know up-front which values |
1 reply
|
I'm going to close this as answered (and addressed more deeply in the moonwalk repo) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, I agree with @ralfhandl . If that is not feasible, you just have to use a
oneOforanyOfschema and there's no real way to correlate the path parameter and the response type. This is something we are working to fix in OAS 4.0 a.k.a. "Moonwalk", and you can follow the discussions in the OAI/sig-moonwalk repository if you are interested.