private Type findSearchReturnType(MethodResourceMapping methodResourceMapping, Class<?> domainType) {
		Type returnType;
		Type returnRepoType = GenericTypeResolver.resolveType(methodResourceMapping.getMethod().getGenericReturnType(), methodResourceMapping.getMethod().getDeclaringClass());
		if (methodResourceMapping.isPagingResource()) {
			returnType = resolveGenericType(PagedModel.class, EntityModel.class, domainType);
		}
		else if (ResolvableType.forType(returnRepoType).getRawClass() != null
				&& Iterable.class.isAssignableFrom(Objects.requireNonNull(ResolvableType.forType(returnRepoType).getRawClass()))) {
			return getTypeForCollectionModel(domainType, methodResourceMapping.isPagingResource());
		}
		else if (ClassUtils.isPrimitiveOrWrapper(methodResourceMapping.getReturnedDomainType())) {
			returnType = methodResourceMapping.getReturnedDomainType();
		}
		else {
			returnType = ResolvableType.forClassWithGenerics(EntityModel.class, domainType).getType();
		}
		return returnType;
	}
Find search return type.

@param methodResourceMapping the method resource mapping
@param domainType            the domain type
@return the type
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestResponseService.java