private Type getTypeForResponseEntity(RequestMethod requestMethod, DataRestRepository dataRestRepository, Class returnedEntityType, ParameterizedType parameterizedType) {
		if (Object.class.equals(parameterizedType.getActualTypeArguments()[0])) {
			return ResolvableType.forClassWithGenerics(ResponseEntity.class, returnedEntityType).getType();
		}
		else if (parameterizedType.getActualTypeArguments()[0] instanceof ParameterizedType) {
			return getTypeForParameterizedType(requestMethod, dataRestRepository, returnedEntityType, parameterizedType);
		}
		else if (parameterizedType.getActualTypeArguments()[0] instanceof WildcardType) {
			return getTypeForWildcardType(requestMethod, dataRestRepository, returnedEntityType, parameterizedType);
		}
		return null;
	}
Gets type for response entity.

@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 response entity
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java