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 736788bfdbe..6df1068cc92 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 @@ -116,6 +116,7 @@ protected T internalFrom(TypeDef definition, String... ignore) { } private T internalFromImpl(TypeDef definition, Set visited, String... ignore) { + visited.add(definition.getFullyQualifiedName()); final B builder = newBuilder(); Set ignores = ignore.length > 0 ? new LinkedHashSet<>(Arrays.asList(ignore)) : Collections @@ -419,7 +420,6 @@ private T internalFromImpl(String name, TypeRef typeRef, Set visited) { if (!def.getFullyQualifiedName().startsWith("java") && visited.contains(def.getFullyQualifiedName())) { throw new IllegalArgumentException("Found a cyclic reference involving " + def.getFullyQualifiedName()); } - visited.add(def.getFullyQualifiedName()); return internalFromImpl(def, visited); } diff --git a/kubernetes-tests/src/test/java/io/fabric8/crd/generator/zookeeper/v1alpha1/Zookeeper.java b/kubernetes-tests/src/test/java/io/fabric8/crd/generator/zookeeper/v1alpha1/Zookeeper.java index 265bf98ef50..edf46803c8b 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/crd/generator/zookeeper/v1alpha1/Zookeeper.java +++ b/kubernetes-tests/src/test/java/io/fabric8/crd/generator/zookeeper/v1alpha1/Zookeeper.java @@ -24,7 +24,8 @@ @Version(value="v1alpha1", storage=false) @Group("io.zookeeper") public class Zookeeper extends CustomResource implements Namespaced { - private ZookeeperSpec spec; - private ZookeeperStatus status; +// TODO: ask if this should be supported or not +// private ZookeeperSpec spec; +// private ZookeeperStatus status; }