diff --git a/modules/openapi-generator/src/main/resources/scala-sttp4-jsoniter/api.mustache b/modules/openapi-generator/src/main/resources/scala-sttp4-jsoniter/api.mustache index f71426b2872b..68230abf8c58 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp4-jsoniter/api.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp4-jsoniter/api.mustache @@ -67,7 +67,7 @@ case class {{classname}}[Auth <: {{invokerPackage}}.Authorization] private (base {{>paramMultipartCreation}}{{/formParams}} ).flatten){{/isMultipart}}{{/formParams.0}}{{#bodyParam}} {{^isFile}}.body(asJson({{paramName}})){{/isFile}}{{#isFile}}.fileBody({{paramName}}){{/isFile}}{{/bodyParam}} - .response({{#separateErrorChannel}}{{^returnType}}asString.mapWithMetadata(ResponseAs.deserializeRightWithError(_ => Right(()))){{/returnType}}{{#fnHandleDownload}}{{#returnType}}asJson[{{>operationReturnType}}]{{/returnType}}{{/fnHandleDownload}}{{/separateErrorChannel}}{{^separateErrorChannel}}{{^returnType}}asString.mapWithMetadata(ResponseAs.deserializeRightWithError(_ => Right(()))).getRight{{/returnType}}{{#returnType}}asJson[{{>operationReturnType}}].getRight{{/returnType}}{{/separateErrorChannel}}) + .response({{#separateErrorChannel}}{{^returnType}}asString.mapWithMetadata(ResponseAs.deserializeRightWithError(_ => Right(()))){{/returnType}}{{#fnHandleDownload}}{{#returnType}}asJson[{{>operationReturnType}}]{{/returnType}}{{/fnHandleDownload}}{{/separateErrorChannel}}{{^separateErrorChannel}}{{^returnType}}asString.mapWithMetadata(ResponseAs.deserializeRightWithError(_ => Right(()))).orFail{{/returnType}}{{#returnType}}asJson[{{>operationReturnType}}].orFail{{/returnType}}{{/separateErrorChannel}}) {{/operation}} {{/operations}}