Enum and OpenAPIGenerator
Question
Hello, how to build enum Int raw value but named cases like:
enum SizeValue: Int {
case mini = 10
case mid = 30
case max = 100
}
with OpenAPI 3.x and swift-openapi-generator ;) Thx for answer :)
Hi @iDevPro,
the OpenAPI specification doesn't support naming raw enum cases, so there isn't much that Swift OpenAPI Generator can do.
I recommend just adding a large comment for the schema itself and documenting the raw values there, which will get included in the doc comment above the generated enum.
I found some answer, but not applicable yet in this generator :)
Yeah those are vendor extensions. These aren't part of the specification, they're just extra annotations that specific tools might look for.