2
2
3
3
/*
4
4
* Copyright 2001-2005 The Apache Software Foundation.
5
- *
5
+ *
6
6
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
7
7
* in compliance with the License. You may obtain a copy of the License at
8
- *
8
+ *
9
9
* http://www.apache.org/licenses/LICENSE-2.0
10
- *
10
+ *
11
11
* Unless required by applicable law or agreed to in writing, software distributed under the License
12
12
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13
13
* or implied. See the License for the specific language governing permissions and limitations under
@@ -210,6 +210,9 @@ public class CodeGenMojo extends AbstractMojo {
210
210
211
211
/**
212
212
* A map of additional properties that can be referenced by the mustache templates
213
+ * <additionalProperties>
214
+ * <additionalProperty>key=value</additionalProperty>
215
+ * </additionalProperties>
213
216
*/
214
217
@ Parameter (name = "additionalProperties" )
215
218
private List <String > additionalProperties ;
@@ -218,7 +221,7 @@ public class CodeGenMojo extends AbstractMojo {
218
221
* A map of reserved names and how they should be escaped
219
222
*/
220
223
@ Parameter (name = "reservedWordsMappings" )
221
- private List <String > reservedWordsMappings ;
224
+ private List <String > reservedWordsMappings ;
222
225
223
226
/**
224
227
* Generate the apis
@@ -466,32 +469,32 @@ public void execute() throws MojoExecutionException {
466
469
}
467
470
468
471
//Apply Instantiation Types
469
- if (instantiationTypes != null && !configOptions .containsKey ("instantiation-types" )) {
472
+ if (instantiationTypes != null && ( configOptions == null || !configOptions .containsKey ("instantiation-types" ) )) {
470
473
applyInstantiationTypesKvpList (instantiationTypes , configurator );
471
474
}
472
475
473
476
//Apply Import Mappings
474
- if (importMappings != null && !configOptions .containsKey ("import-mappings" )) {
477
+ if (importMappings != null && ( configOptions == null || !configOptions .containsKey ("import-mappings" ) )) {
475
478
applyImportMappingsKvpList (importMappings , configurator );
476
479
}
477
480
478
481
//Apply Type Mappings
479
- if (typeMappings != null && !configOptions .containsKey ("type-mappings" )) {
482
+ if (typeMappings != null && ( configOptions == null || !configOptions .containsKey ("type-mappings" ) )) {
480
483
applyTypeMappingsKvpList (typeMappings , configurator );
481
484
}
482
485
483
486
//Apply Language Specific Primitives
484
- if (languageSpecificPrimitives != null && !configOptions .containsKey ("language-specific-primitives" )) {
487
+ if (languageSpecificPrimitives != null && ( configOptions == null || !configOptions .containsKey ("language-specific-primitives" ) )) {
485
488
applyLanguageSpecificPrimitivesCsvList (languageSpecificPrimitives , configurator );
486
489
}
487
490
488
491
//Apply Additional Properties
489
- if (additionalProperties != null && !configOptions .containsKey ("additional-properties" )) {
492
+ if (additionalProperties != null && ( configOptions == null || !configOptions .containsKey ("additional-properties" ) )) {
490
493
applyAdditionalPropertiesKvpList (additionalProperties , configurator );
491
494
}
492
495
493
496
//Apply Reserved Words Mappings
494
- if (reservedWordsMappings != null && !configOptions .containsKey ("reserved-words-mappings" )) {
497
+ if (reservedWordsMappings != null && ( configOptions == null || !configOptions .containsKey ("reserved-words-mappings" ) )) {
495
498
applyReservedWordsMappingsKvpList (reservedWordsMappings , configurator );
496
499
}
497
500
0 commit comments