Skip to content

Commit 5dad330

Browse files
scarf005luckyxilu66
authored andcommitted
fix(typescript-fetch): fix logic when stringEnums is explicitly set to false (OpenAPITools#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 67fc01d commit 5dad330

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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)