Closed qingtao closed 5 months ago
You have to make sure swagger 2.0 support 'oneof'. On the other hand, you dropped the 'description' of the field itself.
You have to make sure swagger 2.0 support 'oneof'. On the other hand, you dropped the 'description' of the field itself.
I checked the v2 branch and Swagger used spec As an anonymous field, Scheme contains OneOf. I don't know if this means it? I used Redoc to display documents, which can correctly display Enums constraints and display referenced custom type constants.
Maybe you can commit PR to v2 branch. The master branch currently follows OpenAPI Specification v2. Try swagger editor2.0.
Describe the PR
The fileld which type is enum, use oneOf not allOf, when it has ref value.
Relation issue
https://github.com/swaggo/swag/issues/1524
Additional context
we has code like this:
use swag gen:
before:
after: