private Type getTypeForParameterizedType(RequestMethod requestMethod, DataRestRepository dataRestRepository, Class returnedEntityType, ParameterizedType parameterizedType) {
		ParameterizedType parameterizedType1 = (ParameterizedType) parameterizedType.getActualTypeArguments()[0];
		Class<?> rawType = ResolvableType.forType(parameterizedType1.getRawType()).getRawClass();
		if (rawType != null && rawType.isAssignableFrom(RepresentationModel.class)) {
			Class<?> type = findType(requestMethod, dataRestRepository);
			if (MapModel.class.equals(type))
				return ResolvableType.forClassWithGenerics(ResponseEntity.class, type).getType();
			else
				return resolveGenericType(ResponseEntity.class, type, returnedEntityType);
		}
		else if (EntityModel.class.equals(parameterizedType1.getRawType())) {
			return resolveGenericType(ResponseEntity.class, EntityModel.class, returnedEntityType);
		}
		return null;
	}
Gets 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
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java