public Stream<Annotation> getTypeParameterAnnotations(AnnotatedType annotatedContainerType, Integer containerItemIndex) {
        if (annotatedContainerType instanceof AnnotatedParameterizedType) {
            AnnotatedType[] typeArguments = ((AnnotatedParameterizedType) annotatedContainerType).getAnnotatedActualTypeArguments();
            int itemIndex = containerItemIndex == null ? 0 : containerItemIndex;
            if (typeArguments.length > itemIndex) {
                return Stream.of(typeArguments[itemIndex].getAnnotations());
            }
        }
        return Stream.empty();
    }
Return the annotations from the annotated container's item.

@param annotatedContainerType annotated container type that is considered if it is an {@link AnnotatedParameterizedType}
@param containerItemIndex parameter index of the desired item on the container type
@return annotation instances (possibly empty if no annotation is present)

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