public List<ResolvedType> lookUpSubtypesFromAnnotation(ResolvedType declaredType, JsonSubTypes subtypesAnnotation, TypeContext context) {
        if (subtypesAnnotation == null) {
            return null;
        }
        return Stream.of(subtypesAnnotation.value())
                .map(entry -> this.resolveSubtype(declaredType, entry, context))
                .collect(Collectors.toList());
    }
Mapping the declared erased types from the annotation to resolved types. Returns {@code null} if annotation is {@code null}/not present.

@param declaredType supertype encountered while generating a schema
@param subtypesAnnotation annotation to derive applicable subtypes from.
@param context type context for proper type resolution
@return resolved annotated subtypes (or {@code null} if given annotation is {@code null})
jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonSubTypesResolver.java