You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means that anything nested in the mustache tags {{#operation}}{{#isResponseFile}} never get evaluated, even for file type responses.
Swagger-codegen version
master branch
Suggest a Fix
The fix is very simple: the function public boolean isDataTypeFile(String dataType) needs to be implemented in SwiftCodegen.java and Swift3Codegen.java. Since these methods are currently not implemented, the response type incorrectly uses the same function from DefaultCodegen.java, which looks for the type string "file" instead of the Swift equivalent "NSURL" or "URL".
I can create a pull request with the fix if you like.
The text was updated successfully, but these errors were encountered:
Description
For Swift codegen, the
CodegenOperation
'sdefaultResponse
is never set to typefile
, even when specified in the swagger doc, like so:This means that anything nested in the mustache tags
{{#operation}}{{#isResponseFile}}
never get evaluated, even for file type responses.Swagger-codegen version
master branch
Suggest a Fix
The fix is very simple: the function
public boolean isDataTypeFile(String dataType)
needs to be implemented inSwiftCodegen.java
andSwift3Codegen.java
. Since these methods are currently not implemented, the response type incorrectly uses the same function fromDefaultCodegen.java
, which looks for the type string "file" instead of the Swift equivalent "NSURL" or "URL".I can create a pull request with the fix if you like.
The text was updated successfully, but these errors were encountered: