What would be the way to provide for multiple 200 OK response options (different data types) and have the structs be documented in the UI as well?
Putting multiple #[oai(status = 200)] items into a single ApiResponse struct results in only the last option being reflected as the OK response for all API methods, and also apparently violates the OpenAPI spec (even though Poem still happily generates it.)
Using an Enum seems and a single #[oai(status = 200)] item seems to be more correct OpenAPI-spec wise, but the UI still only shows the last option.
Any pointers/examples? Would using distinct ApiResponse enums be the only way to achieve this?
What would be the way to provide for multiple 200 OK response options (different data types) and have the structs be documented in the UI as well?
Putting multiple
#[oai(status = 200)]
items into a singleApiResponse
struct results in only the last option being reflected as the OK response for all API methods, and also apparently violates the OpenAPI spec (even though Poem still happily generates it.)Using an Enum seems and a single
#[oai(status = 200)]
item seems to be more correct OpenAPI-spec wise, but the UI still only shows the last option.Any pointers/examples? Would using distinct ApiResponse enums be the only way to achieve this?