diff --git a/src/main/java/it/aboutbits/springboot/toolbox/swagger/type/CustomTypePropertyCustomizer.java b/src/main/java/it/aboutbits/springboot/toolbox/swagger/type/CustomTypePropertyCustomizer.java index 169e024..b0a492b 100644 --- a/src/main/java/it/aboutbits/springboot/toolbox/swagger/type/CustomTypePropertyCustomizer.java +++ b/src/main/java/it/aboutbits/springboot/toolbox/swagger/type/CustomTypePropertyCustomizer.java @@ -33,10 +33,17 @@ public Schema customize(Schema property, AnnotatedType annotatedType) { } if (CustomType.class.isAssignableFrom(rawClass)) { - @SuppressWarnings("unchecked") - var wrappedType = CustomTypeReflectionUtil.getWrappedType( - (Class>) rawClass - ); + Class wrappedType = null; + if (rawClass.equals(EntityId.class)) { + wrappedType = simpleType.getBindings() + .getTypeParameters() + .getFirst() + .getRawClass(); + } else { + wrappedType = CustomTypeReflectionUtil.getWrappedType( + (Class>) rawClass + ); + } var isIdentity = EntityId.class.isAssignableFrom(rawClass);