Skip to content

Commit 5a2503d

Browse files
authored
fix(typescript-fetch): fix logic when stringEnums is explicitly set to false (#22466)
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 1e7ca08 commit 5a2503d

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)