public ResolvedType getTypeWithAnnotation(ResolvedType targetType, Class<? extends Annotation> annotationType) {
        return this.getTypeWithAnnotation(targetType, annotationType, TypeContext.IGNORE_ANNOTATIONS_ON_ANNOTATIONS);
    }
Find the (super) type, including interfaces, that has the designated type annotation.

@param targetType type to check for the annotation, potentially iterating over its declared interfaces and super types
@param annotationType type of annotation to look for
@return (super) type with the targeted annotation (or {@code null} if the annotation wasn't found on any of its interfaces or super types)

@since 4.28.0
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeContext.java