From 928f27fe6c96a419aa19a94ed6c61301a511d74e Mon Sep 17 00:00:00 2001 From: Ethan Uberseder Date: Wed, 1 May 2024 09:40:49 -0400 Subject: [PATCH] continue to mark JsonAny field with x-kubernetes-preserve-unknown-fields --- .../java/io/fabric8/crd/generator/AbstractJsonSchema.java | 2 +- .../java/io/fabric8/crd/generator/v1/JsonSchemaTest.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/AbstractJsonSchema.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/AbstractJsonSchema.java index 8a00b7db6d0..39bb27d22d6 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/AbstractJsonSchema.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/AbstractJsonSchema.java @@ -345,7 +345,7 @@ private T internalFromImpl(TypeDef definition, Set visited, List fooProperties = fooField.getProperties(); + JSONSchemaProps configAsMapField = fooProperties.get("configAsMap"); + + assertNotNull(configAsMapField); + assertTrue(configAsMapField.getXKubernetesPreserveUnknownFields()); } @Test