From 1482fe9e8c703118d654241365c03b1c740750a9 Mon Sep 17 00:00:00 2001 From: bgong <bgong@mdsol.com> Date: Mon, 28 Mar 2022 14:39:36 -0400 Subject: [PATCH] convert header parameter to string --- .../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]) /** -- GitLab