forked from loafle/openapi-generator-original
[MAVEN PLUGIN] Checking for null configOptions before looking for property (#7613)
* Checking for null configOptions * Inline configOptions check
This commit is contained in:
parent
f41683a5ba
commit
0a28aad73b
@ -210,6 +210,9 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
|
||||
/**
|
||||
* A map of additional properties that can be referenced by the mustache templates
|
||||
* <additionalProperties>
|
||||
* <additionalProperty>key=value</additionalProperty>
|
||||
* </additionalProperties>
|
||||
*/
|
||||
@Parameter(name = "additionalProperties")
|
||||
private List<String> additionalProperties;
|
||||
@ -466,32 +469,32 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
}
|
||||
|
||||
//Apply Instantiation Types
|
||||
if (instantiationTypes != null && !configOptions.containsKey("instantiation-types")) {
|
||||
if (instantiationTypes != null && (configOptions == null || !configOptions.containsKey("instantiation-types"))) {
|
||||
applyInstantiationTypesKvpList(instantiationTypes, configurator);
|
||||
}
|
||||
|
||||
//Apply Import Mappings
|
||||
if (importMappings != null && !configOptions.containsKey("import-mappings")) {
|
||||
if (importMappings != null && (configOptions == null || !configOptions.containsKey("import-mappings"))) {
|
||||
applyImportMappingsKvpList(importMappings, configurator);
|
||||
}
|
||||
|
||||
//Apply Type Mappings
|
||||
if (typeMappings != null && !configOptions.containsKey("type-mappings")) {
|
||||
if (typeMappings != null && (configOptions == null || !configOptions.containsKey("type-mappings"))) {
|
||||
applyTypeMappingsKvpList(typeMappings, configurator);
|
||||
}
|
||||
|
||||
//Apply Language Specific Primitives
|
||||
if (languageSpecificPrimitives != null && !configOptions.containsKey("language-specific-primitives")) {
|
||||
if (languageSpecificPrimitives != null && (configOptions == null || !configOptions.containsKey("language-specific-primitives"))) {
|
||||
applyLanguageSpecificPrimitivesCsvList(languageSpecificPrimitives, configurator);
|
||||
}
|
||||
|
||||
//Apply Additional Properties
|
||||
if (additionalProperties != null && !configOptions.containsKey("additional-properties")) {
|
||||
if (additionalProperties != null && (configOptions == null || !configOptions.containsKey("additional-properties"))) {
|
||||
applyAdditionalPropertiesKvpList(additionalProperties, configurator);
|
||||
}
|
||||
|
||||
//Apply Reserved Words Mappings
|
||||
if (reservedWordsMappings != null && !configOptions.containsKey("reserved-words-mappings")) {
|
||||
if (reservedWordsMappings != null && (configOptions == null || !configOptions.containsKey("reserved-words-mappings"))) {
|
||||
applyReservedWordsMappingsKvpList(reservedWordsMappings, configurator);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user