tamasfe/aide

How to show variant name of tagged enum?

Opened this issue · 2 comments

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?
image

Seems related to GREsau/schemars#157

@JakkuSakura I believe this issue is the answer.