From 6a3a385f8c03c3aa777df19696c94d73c85e86d9 Mon Sep 17 00:00:00 2001 From: bgong-mdsol Date: Wed, 30 Mar 2022 04:44:43 -0400 Subject: [PATCH] convert header parameter to string (#11991) --- .../src/main/resources/scala-sttp/paramCreation.mustache | 2 +- .../src/main/scala/org/openapitools/client/api/PetApi.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache index 68280bd9a36..25ec73e8d5e 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache @@ -1 +1 @@ -"{{baseName}}", {{#isContainer}}ArrayValues({{{paramName}}}{{#collectionFormat}}, {{collectionFormat.toUpperCase}}{{/collectionFormat}}){{/isContainer}}{{^isContainer}}{{{paramName}}}{{/isContainer}} \ No newline at end of file +"{{baseName}}", {{#isContainer}}ArrayValues({{{paramName}}}{{#collectionFormat}}, {{collectionFormat.toUpperCase}}{{/collectionFormat}}){{/isContainer}}{{^isContainer}}{{{paramName}}}{{/isContainer}}.toString \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala index 93e70e0015b..3f6ad7782ee 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala @@ -56,7 +56,7 @@ class PetApi(baseUrl: String) { basicRequest .method(Method.DELETE, uri"$baseUrl/pet/${petId}") .contentType("application/json") - .header("api_key", apiKey) + .header("api_key", apiKey.toString) .response(asJson[Unit]) /**