aide
aide copied to clipboard
How to show variant name of tagged enum?
My endpoint returns a tagged enum
enum Foo {
Price(FooPrice),
...
}
However, in redoc it's displayed as many object
. I have to click through them to see the details. I checked the generated openai.json, each variant is inlined within the enum, rather than taking a reference to #/components/schemas/Foo_FooPrice
I wonder if there's a way to let variants display with their name, rather than object
?
Seems related to https://github.com/GREsau/schemars/issues/157
@JakkuSakura I believe this issue is the answer.