public Optional<ResolvedType> getIdentityReferenceType(ResolvedType javaType, TypeContext typeContext) {
        JsonIdentityReference referenceAnnotation = AnnotationHelper.resolveAnnotation(javaType.getErasedType(), JsonIdentityReference.class,
                JacksonModule.NESTED_ANNOTATION_CHECK).orElse(null);
        return this.getIdentityReferenceType(referenceAnnotation, javaType, typeContext);
    }
If applicable, determine the type of the identity reference that should replace the given actual type, if the
{@code @JsonIdentityReference(alwaysAsId = true)} annotation is present as well as a corresponding {@code @JsonIdentityInfo} annotation on the
type itself.

@param javaType reference type that may be replaced by a reference to its identity property
@param typeContext type context providing convenience methods, e.g., for the annotation or member look-up
@return designated type of the applicable identity reference (may be empty)
jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonIdentityReferenceDefinitionProvider.java