Skip to content

Commit

Permalink
fix: temp fix to support JsonTypeInfo annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Apr 5, 2023
1 parent ab4e8f0 commit e2a85ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static class TestCR extends CustomResource<TestCR.TestCRSpec, Void> implements N
static class TestCRSpec implements KubernetesResource {

@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
private final Map<String, Object> additionalProperties = new HashMap<>();

private List<Child> children = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
package io.fabric8.kubernetes.model.jackson;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -69,4 +71,19 @@ public void serializeAsField(Object bean, JsonGenerator gen, SerializerProvider
delegate.getName(), valueInAnyGetter, bean.getClass().getName());
}
}

@Override
public void assignNullSerializer(JsonSerializer<Object> nullSer) {
delegate.assignNullSerializer(nullSer);
}

@Override
public void assignSerializer(JsonSerializer<Object> ser) {
delegate.assignSerializer(ser);
}

@Override
public void assignTypeSerializer(TypeSerializer typeSer) {
delegate.assignTypeSerializer(typeSer);
}
}

0 comments on commit e2a85ad

Please sign in to comment.