private Type getTypeForWildcardType(RequestMethod requestMethod, DataRestRepository dataRestRepository, Class returnedEntityType, ParameterizedType parameterizedType) {
		WildcardType wildcardType = (WildcardType) parameterizedType.getActualTypeArguments()[0];
		if (wildcardType.getUpperBounds()[0] instanceof ParameterizedType wildcardTypeUpperBound) {
			if (RepresentationModel.class.equals(wildcardTypeUpperBound.getRawType())) {
				Class<?> type = findType(requestMethod, dataRestRepository);
				if (MapModel.class.equals(type))
					return ResolvableType.forClassWithGenerics(ResponseEntity.class, type).getType();
				else
					return resolveGenericType(ResponseEntity.class, type, returnedEntityType);
			}
		}
		return null;
	}
Gets type for wildcard type.

@param requestMethod      the request method
@param dataRestRepository the data rest repository
@param returnedEntityType the returned entity type
@param parameterizedType  the parameterized type
@return the type for wildcard type
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java