From 1a0ee2f94b0dfe0a031de886df23a63e63d151a8 Mon Sep 17 00:00:00 2001 From: Mickael MAGNIEZ Date: Fri, 8 Oct 2021 09:32:24 +0200 Subject: [PATCH] fix: don't send just " " in body, send an empty string --- .../src/main/resources/scala-akka-client/apiInvoker.mustache | 2 +- .../main/scala/org/openapitools/client/core/ApiInvoker.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache index a82135170c43..f9dd5c19b872 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache @@ -172,7 +172,7 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC case Some(c: String) => HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(c))) case _ => - HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(" "))) + HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(""))) } case m: HttpMethod => HttpRequest(m, uri) } diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala index fe3910967139..74575e12cdd1 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala @@ -182,7 +182,7 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC case Some(c: String) => HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(c))) case _ => - HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(" "))) + HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(""))) } case m: HttpMethod => HttpRequest(m, uri) }