[Swift] Detect file type in Swift codegen

This commit is contained in:
Anthony Oliveri 2017-03-14 15:02:34 -05:00
parent bbe3fd4c71
commit 88a755f368
2 changed files with 11 additions and 1 deletions

View File

@ -278,6 +278,11 @@ public class Swift3Codegen extends DefaultCodegen implements CodegenConfig {
return toModelName(type);
}
@Override
public boolean isDataTypeFile(String dataType) {
return dataType != null && dataType.equals("URL");
}
@Override
public boolean isDataTypeBinary(final String dataType) {
return dataType != null && dataType.equals("Data");

View File

@ -276,9 +276,14 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
return toModelName(type);
}
@Override
public boolean isDataTypeFile(String dataType) {
return dataType != null && dataType.equals("NSURL");
}
@Override
public boolean isDataTypeBinary(final String dataType) {
return dataType != null && dataType.equals("NSData");
return dataType != null && dataType.equals("NSData");
}
/**