[JAVA] fix "text/plain" with charset specifications (#15399)

This commit is contained in:
martin-mfg
2023-05-11 10:47:42 +02:00
committed by GitHub
parent 977de5b324
commit e152799569
7 changed files with 17 additions and 17 deletions

View File

@@ -182,7 +182,7 @@ public class BodyApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -263,7 +263,7 @@ public class BodyApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -417,7 +417,7 @@ public class BodyApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -498,7 +498,7 @@ public class BodyApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(

View File

@@ -124,7 +124,7 @@ public class FormApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(

View File

@@ -124,7 +124,7 @@ public class HeaderApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(

View File

@@ -122,7 +122,7 @@ public class PathApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(

View File

@@ -127,7 +127,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -221,7 +221,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -319,7 +319,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -413,7 +413,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -505,7 +505,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -597,7 +597,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -687,7 +687,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(
@@ -782,7 +782,7 @@ public class QueryApi {
}
// for plain text response
if (localVarResponse.headers().map().containsKey("Content-Type") &&
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) {
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
String responseBodyText = s.hasNext() ? s.next() : "";
return new ApiResponse<String>(