[SWIFT4] Generated Code has warnings when using Swift 4.2 Compiler
Created by: james-rantmedia
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) https://github.com/swagger-api/swagger-codegen/issues/8336
Suggest a fix/enhancement
I will be submitting a PR to fix these warnings, and will update this issue when it's submitted.