Skip to content

Commit 4298c38

Browse files
committed
refactor: simplify application/octet-stream check
1 parent 71ccc88 commit 4298c38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,8 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<Mo
962962
).trim();
963963
return "multipart/form-data".equals(mediaType)
964964
|| "application/x-www-form-urlencoded".equals(mediaType)
965-
|| (mediaType.startsWith("application/") && (mediaType.endsWith("json") || mediaType.endsWith("octet-stream")));
965+
|| (mediaType.startsWith("application/") && mediaType.endsWith("json"))
966+
|| "application/octet-stream".equals(mediaType);
966967
};
967968
operation.consumes = operation.consumes == null ? null : operation.consumes.stream()
968969
.filter(isSerializable)

0 commit comments

Comments
 (0)