mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 00:13:50 +00:00
[Typescript] Fix warning logs for additional properties that have not been set (#21630)
* Fix warning logs for additional properties that have not been set * Readd warning log details to clarify what option that the log refers to
This commit is contained in:
parent
fe5305f2cf
commit
6c31cbbf47
@ -6028,10 +6028,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (properties != null) {
|
||||
for (String key : properties.keySet()) {
|
||||
properties.put(key, unaliasSchema(properties.get(key)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
@ -7097,7 +7095,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
} else if (booleanValue instanceof String) {
|
||||
result = Boolean.parseBoolean((String) booleanValue);
|
||||
} else {
|
||||
LOGGER.warn("The value (generator's option) must be either boolean or string. Default to `false`.");
|
||||
LOGGER.warn("The generator's option \"{}\" must be either boolean or string. Default to `false`.", propertyKey);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -83,6 +83,11 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp
|
||||
|
||||
private final Map<String, String> frameworkToHttpLibMap;
|
||||
|
||||
@Setter
|
||||
private boolean useRxJS;
|
||||
@Setter
|
||||
private boolean useInversify;
|
||||
|
||||
// NPM Options
|
||||
private static final String NPM_REPOSITORY = "npmRepository";
|
||||
|
||||
@ -461,12 +466,12 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp
|
||||
additionalProperties.put(IMPORT_FILE_EXTENSION_SWITCH, ".ts");
|
||||
}
|
||||
|
||||
final boolean useRxJS = convertPropertyToBooleanAndWriteBack(USE_RXJS_SWITCH);
|
||||
convertPropertyToBooleanAndWriteBack(USE_RXJS_SWITCH, this::setUseRxJS);
|
||||
if (!useRxJS) {
|
||||
supportingFiles.add(new SupportingFile("rxjsStub.mustache", "rxjsStub.ts"));
|
||||
}
|
||||
|
||||
final boolean useInversify = convertPropertyToBooleanAndWriteBack(USE_INVERSIFY_SWITCH);
|
||||
convertPropertyToBooleanAndWriteBack(USE_INVERSIFY_SWITCH, this::setUseInversify);
|
||||
if (useInversify) {
|
||||
supportingFiles.add(new SupportingFile("services" + File.separator + "index.mustache", "services", "index.ts"));
|
||||
supportingFiles.add(new SupportingFile("services" + File.separator + "configuration.mustache", "services", "configuration.ts"));
|
||||
|
@ -313,7 +313,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
||||
}
|
||||
}
|
||||
|
||||
setGenerateValidationAttributes(convertPropertyToBooleanAndWriteBack(VALIDATION_ATTRIBUTES));
|
||||
convertPropertyToBooleanAndWriteBack(VALIDATION_ATTRIBUTES, this::setGenerateValidationAttributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user