Skip to content

Commit 3083bdc

Browse files
committed
concord-cli: ignore unknown properties in the CLI config file
1 parent 377efcf commit 3083bdc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/src/main/java/com/walmartlabs/concord/cli/CliConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* =====
2121
*/
2222

23+
import com.fasterxml.jackson.databind.DeserializationFeature;
2324
import com.fasterxml.jackson.databind.JsonMappingException;
2425
import com.fasterxml.jackson.databind.JsonNode;
2526
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -38,7 +39,8 @@
3839
public record CliConfig(Map<String, CliConfigContext> contexts) {
3940

4041
public static CliConfig load(Path path) throws IOException {
41-
var mapper = new YAMLMapper();
42+
var mapper = new YAMLMapper()
43+
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
4244

4345
JsonNode defaults = mapper.readTree(readDefaultConfig());
4446

0 commit comments

Comments
 (0)