-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Description
The generated AlamofireImplementations.swift file has a non thread-locked dictionary to save session managers. Accessing this dictionary from multiple threads at the same times causes a crash. Not all versions of this file in the file tree has a defect implementation. Simply copy a fixed version to all non fixed versions will fix this issue.
Some implementation of this file in the Swift 5 generator also needs a fix.
Swagger-codegen version
3.0.14
Command line used for generation
swagger-codegen generate -l swift4 -DprojectName=FolderService -i swagger.json -o folder --model-name-prefix "FolderService"
Steps to reproduce
Generate swift 4 code with v 3.0.14 installed via Homebrew.
Related issues/PRs
Suggest a fix/enhancement
Copy solution from fixed implementations of the AlamofireImplementations.swift
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/swift4/AlamofireImplementations.mustache