private Operation buildSearchOperation(HandlerMethod handlerMethod, DataRestRepository dataRestRepository,
			OpenAPI openAPI, RequestMethod requestMethod, MethodAttributes methodAttributes,
			MethodResourceMapping methodResourceMapping, ResourceMetadata resourceMetadata) {
		Class<?> domainType = dataRestRepository.getDomainType();
		Operation operation = initOperation(handlerMethod, domainType, requestMethod);

		// Add support for operation annotation
		io.swagger.v3.oas.annotations.Operation apiOperation = AnnotatedElementUtils.findMergedAnnotation(methodResourceMapping.getMethod(),
				io.swagger.v3.oas.annotations.Operation.class);

		if (apiOperation != null)
			operationService.parse(apiOperation, operation, openAPI, methodAttributes);

		ParametersMetadata parameterMetadata = methodResourceMapping.getParametersMetadata();
		Method method = methodResourceMapping.getMethod();

		if (!CollectionUtils.isEmpty(parameterMetadata.getParameterNames())) {
			HandlerMethod repositoryHandlerMethod = new HandlerMethod(methodResourceMapping.getMethod().getDeclaringClass(), methodResourceMapping.getMethod());
			MethodParameter[] parameters = repositoryHandlerMethod.getMethodParameters();
			for (MethodParameter methodParameter : parameters) {
				dataRestRequestService.buildCommonParameters(openAPI, requestMethod, methodAttributes, operation, new String[] { methodParameter.getParameterName() }, new MethodParameter[] { methodParameter }, dataRestRepository);
			}
		}

		for (ParameterMetadata parameterMetadatum : parameterMetadata) {
			String pName = parameterMetadatum.getName();
			ResourceDescription description = parameterMetadatum.getDescription();
			if (description instanceof TypedResourceDescription) {
				Type type = getParameterType(pName, method, description);
				Schema<?> schema = SpringDocAnnotationsUtils.extractSchema(openAPI.getComponents(), type, null, null, openAPI.getSpecVersion());
				Parameter parameter = getParameterFromAnnotations(openAPI, methodAttributes, method, pName);
				if (parameter == null) {
					parameter = new Parameter().name(pName).in(ParameterIn.QUERY.toString()).schema(schema);
					operation.addParametersItem(parameter);
				}
				else if (CollectionUtils.isEmpty(operation.getParameters()))
					operation.addParametersItem(parameter);
				else
					GenericParameterService.mergeParameter(operation.getParameters(), parameter);
			}
		}

		if (methodResourceMapping.isPagingResource()) {
			MethodParameter[] parameters = handlerMethod.getMethodParameters();
			Arrays.stream(parameters).filter(methodParameter -> DefaultedPageable.class.equals(methodParameter.getParameterType())).findAny()
					.ifPresent(methodParameterPage -> dataRestRequestService.buildCommonParameters(openAPI, requestMethod, methodAttributes, operation,
							new String[] { methodParameterPage.getParameterName() }, new MethodParameter[] { methodParameterPage }, dataRestRepository));
		}
		dataRestResponseService.buildSearchResponse(operation, handlerMethod, openAPI, methodResourceMapping, domainType, methodAttributes, resourceMetadata, dataRestRepository);
		tagsBuilder.buildSearchTags(operation, handlerMethod, dataRestRepository, method);
		return operation;
	}
Build search operation.

@param handlerMethod         the handler method
@param dataRestRepository    the repository data rest
@param openAPI               the open api
@param requestMethod         the request method
@param methodAttributes      the method attributes
@param methodResourceMapping the method resource mapping
@param resourceMetadata      the resource metadata
@return the operation
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestOperationService.java