ITADN

[Question]: x-enumNames or x-enum-varnames rendering

#3783Closedkillerwife 创建于 2026-02-12
question
K
killerwifecommented
### What are you wanting to achieve? Hey, I have a simple task, I have an integer enum, and I want to display x-enumNames or x-enum-varnames extension readout for users ### What code or approach do you have so far? Does swashbuckle currently support rendering it? The json I end up creating is this: ``` "SendingMethod": { "enum": [ 1, 2, 3 ], "type": "integer", "description": "Possible values:", "format": "int32", "x-enumNames": [ "One", "Two", "Three" ] } ``` I can stick it into description ofc but thats not exactly what I would want due to codegen. If this is meant to be done differently, so that when I open it up it shows name hints, that would be great. ### Additional context _No response_
关闭于 2026-02-12 2 条评论