OpenAPITools / OpenAPITools/openapi-generator

[Swift4] enum cases are disappeared

Open
#1,702 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Swift Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

All of enum cases are disappeared.

openapi-generator version

4.0.0 (master)

OpenAPI declaration file content or url
Order:
    type: object
    properties:
      id:
        type: integer
        format: int64
      petId:
        type: integer
        format: int64
      quantity:
        type: integer
        format: int32
      shipDate:
        type: string
        format: date-time
      status:
        type: string
        description: Order Status
        enum:
          - placed
          - approved
          - delivered
      complete:
        type: boolean
        default: false
    xml:
      name: Order
Command line used for generation

./bin/swift4-all.sh

Steps to reproduce
screen shot 2018-12-18 at 19 04 46
Related issues/PRs
Suggest a fix

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running ./bin/swift4-all.sh with the Order OpenAPI declaration from the issue. Inspect the generated Swift model for the status property and compare it with the enum values placed, approved, and delivered. Done means the generated model preserves and exposes all three enum cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.