Discussions
Unusual rendering of enum values in Response objects
I've noticed that enums render a little funny in the response schemas generated for the API Reference.
Can anyone help me understand why all but the first value of the enum seem to be consistently re-rendered at the bottom of the enum? Here we see 1 here, which really isn't serving any purpose I can understand. I've uploaded the same schema in other products and they don't render the extra row at the bottom here.
An example of the relevant YAML is attached for review:
customertype_name:
enum:
- 0
- 1
type: integer
description: |-
0
- Personal
_ 1
- Business
readOnly: true
Thanks for any advice.
Sample from Redoc below, which shows both values for the enum:
Hoping somebody can assist here, thank you.
Hi Brian,
Thanks for reaching out; my name is Darren from ReadMe Support and I'll be assisting you today! When enums are created, we try to display all the available options of the enum in the response schema. It looks like this might be a bug with how we're displaying the available options.
I'll send a ticket over to our engineering team so they can investigate this issue and push a fix. We can't provide a timeframe, but we can reach out as soon as there are any updates!
Best,
Darren