apple / apple/swift-openapi-generator

Enum and OpenAPIGenerator

Open
#784 3 comments 0 reactions 0 assignees View on GitHub
kind/support status/triage
Dominant language
Swift
Stars
2k
Forks
182
Avg merge
13h 28m
Merged PRs (30d)
5

Description

### Question

Hello, how to build enum Int raw value but named cases like:
```swift
enum SizeValue: Int {
case mini = 10
case mid = 30
case max = 100
}
```
with OpenAPI 3.x and swift-openapi-generator ;)
Thx for answer :)

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by examining how an OpenAPI 3.x document represents enums and how swift-openapi-generator maps them to Swift enums with Int raw values; done means documenting or implementing support for named cases with raw values 10, 30, and 100.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, swift
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.