Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SWIFT4] Generated Code has warnings when using Swift 4.2 Compiler #1406

Closed
james-rant opened this issue Nov 9, 2018 · 0 comments
Closed

Comments

@james-rant
Copy link
Contributor

Description

When using Xcode 10 with swift 4.2, the generated code from the swift4 openapi-generator contains a few warnings. They're not necessarily causing any problems, but I like a clean codebase.

The warnings:

APIs.swift:10:21: Static declarations are implicitly 'final'; use 'public' instead of 'open'
APIs.swift:13:21: Static declarations are implicitly 'final'; use 'public' instead of 'open'
APIs.swift:11:21: Static declarations are implicitly 'final'; use 'public' instead of 'open'
APIs.swift:12:21: Static declarations are implicitly 'final'; use 'public' instead of 'open'
Models.swift:18:14: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
Models.swift:19:14: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
Models.swift:20:14: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
CodableHelper.swift:14:21: Static declarations are implicitly 'final'; use 'public' instead of 'open'
AlamofireImplementations.swift:157:141: Using '!' here is deprecated and will be removed in a future release
AlamofireImplementations.swift:359:141: Using '!' here is deprecated and will be removed in a future release
openapi-generator version

3.3.2

Command line used for generation

openapi-generator generate -i swagger.json -l swift4 -o ~/Desktop/APIClient

Steps to reproduce
  • Generate a swift4 client from an open api spec document.
  • Add the generated code to a Swift 4.2 project and build
  • See warnings
Related issues/PRs

Swagger-Codegen has a related issue (which I also submitted a PR for before knowing about the OpenAPI-Generator fork) swagger-api/swagger-codegen#8336

Suggest a fix/enhancement

I will be submitting a PR to fix these warnings, and will update this issue when it's submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants