swagger-api / swagger-api/swagger-codegen

No empty constructor in models with swift4 mustach generation

Open
#9,029 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Hello,

Description

No empty constructor in models with swift4 mustach generation.

Swagger-codegen version

2.4.0-SNAPSHOT

Command line used for generation

With maven plugin 'swagger-codegen-maven-plugin'

<configuration> <language>swift4</language> <configOptions> <podVersion>XXX</podVersion> <podAuthors>XXX</podAuthors> <podSource>XXX</podSource> </configOptions> </configuration>

Suggest a fix/enhancement

In swift 3 there is :
{{^unwrapRequired}}
{{^parent}}public init() {}{{/parent}}{{/unwrapRequired}}
{{#unwrapRequired}}

Maybe we can do same thing

Thanks,

Alexis

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

Locate the Swift4 Mustache model template used by the swagger-codegen-maven-plugin and compare it with the Swift 3 snippet in the issue. Generate a Swift4 model using the shown configuration and confirm that the expected empty constructor is present.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.