Skip to content

Commit 46decb7

Browse files
committed
fix(typescript-fetch): fix logic when stringEnums is explicitly set to false
Passing `stringEnums=false` was incorrectly treated as `true`. This went unnoticed since the default behavior works as expected. Made the logic consistent with `typescript-axios`.
1 parent 7b83462 commit 46decb7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ public void processOpts() {
283283

284284
if (additionalProperties.containsKey(STRING_ENUMS)) {
285285
this.setStringEnums(convertPropertyToBoolean(STRING_ENUMS));
286+
additionalProperties.put("stringEnums", this.stringEnums);
286287
}
287288

288289
if (additionalProperties.containsKey(FILE_NAMING)) {

0 commit comments

Comments
 (0)