|
16 | 16 | import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyInstantiationTypesKvpList;
|
17 | 17 | import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyLanguageSpecificPrimitivesCsvList;
|
18 | 18 | import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyReservedWordsMappingsKvpList;
|
| 19 | +import static io.swagger.codegen.config.CodegenConfiguratorUtils.applySystemPropertiesKvpList; |
19 | 20 | import static io.swagger.codegen.config.CodegenConfiguratorUtils.applyTypeMappingsKvpList;
|
20 | 21 | import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
21 | 22 |
|
@@ -80,6 +81,9 @@ public static ClientOptInput getClientOptInput(GenerationRequest generationReque
|
80 | 81 | if (options.getRemoveOperationIdPrefix() != null) {
|
81 | 82 | configurator.setRemoveOperationIdPrefix(options.getRemoveOperationIdPrefix());
|
82 | 83 | }
|
| 84 | + if (options.getSystemProperties() != null) { |
| 85 | + applySystemPropertiesKvpList(options.getSystemProperties(), configurator); |
| 86 | + } |
83 | 87 | if (options.getInstantiationTypes() != null) {
|
84 | 88 | applyInstantiationTypesKvpList(options.getInstantiationTypes(), configurator);
|
85 | 89 | }
|
@@ -157,6 +161,15 @@ public static ClientOptInput getClientOptInput(JsonNode node, String outputDir)
|
157 | 161 | configurator.setRemoveOperationIdPrefix(node.findValue("removeOperationIdPrefix").booleanValue());
|
158 | 162 | }
|
159 | 163 |
|
| 164 | + JsonNode systemPropertiesNode = node.findValue("systemProperties"); |
| 165 | + if (systemPropertiesNode != null && systemPropertiesNode.isArray()) { |
| 166 | + List<String> systemProperties = new ArrayList<>(); |
| 167 | + for (JsonNode jsonNode : systemPropertiesNode) { |
| 168 | + systemProperties.add(jsonNode.textValue()); |
| 169 | + } |
| 170 | + applySystemPropertiesKvpList(systemProperties, configurator); |
| 171 | + } |
| 172 | + |
160 | 173 | JsonNode instantiationTypesNode = node.findValue("instantiationTypes");
|
161 | 174 | if (instantiationTypesNode != null && instantiationTypesNode.isArray()) {
|
162 | 175 | List<String> instantiationTypes = new ArrayList<>();
|
|
0 commit comments