[swift5][client] create comment to warn about android api version (#11830)

This commit is contained in:
Bruno Coelho 2022-03-08 16:03:02 +00:00 committed by GitHub
parent 0e4eb50af2
commit 00ef435018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 15 additions and 0 deletions

View File

@ -227,6 +227,7 @@ import com.squareup.moshi.adapter
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
{{^supportAndroidApiLevel25AndBelow}} {{^supportAndroidApiLevel25AndBelow}}
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.{{packageName}}", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.{{packageName}}", null).toFile()
{{/supportAndroidApiLevel25AndBelow}} {{/supportAndroidApiLevel25AndBelow}}
{{#supportAndroidApiLevel25AndBelow}} {{#supportAndroidApiLevel25AndBelow}}

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -128,6 +128,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -128,6 +128,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -131,6 +131,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ internal open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -126,6 +126,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))

View File

@ -129,6 +129,7 @@ open class ApiClient(val baseUrl: String) {
} }
if (T::class.java == File::class.java) { if (T::class.java == File::class.java) {
// return tempfile // return tempfile
// Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options
val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() val f = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile()
f.deleteOnExit() f.deleteOnExit()
val out = BufferedWriter(FileWriter(f)) val out = BufferedWriter(FileWriter(f))