Skip to content

Commit 23aa2e2

Browse files
authored
Added default headers to ServerError<T> for Kotlin OkHTTP generator (#20161)
1 parent 2b891f6 commit 23aa2e2

22 files changed

Lines changed: 22 additions & 22 deletions

File tree

  • modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure
  • samples/client
    • others/kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/infrastructure
    • petstore
      • kotlin-allOff-discriminator/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-array-simple-string-jvm-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-bigdecimal-default-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-default-values-jvm-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-explicit/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-kotlinx-datetime/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-modelMutable/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-name-parameter-mappings/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure
      • kotlin/src/main/kotlin/org/openapitools/client/infrastructure

modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/infrastructure/ApiResponse.kt.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ package {{packageName}}.infrastructure
3939
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val message: String? = null,
4040
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/others/kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-allOff-discriminator/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-bigdecimal-default-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-default-values-jvm-okhttp4/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-enum-default-value/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ public class ServerError<T>(
3939
public val message: String? = null,
4040
public val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class ServerError<T>(
3939
val message: String? = null,
4040
val body: Any? = null,
4141
override val statusCode: Int = -1,
42-
override val headers: Map<String, List<String>>
42+
override val headers: Map<String, List<String>> = mapOf()
4343
): ApiResponse<T>(ResponseType.ServerError)

0 commit comments

Comments
 (0)