public void buildSearchResponse(Operation operation, HandlerMethod handlerMethod, OpenAPI openAPI,
			MethodResourceMapping methodResourceMapping, Class<?> domainType, MethodAttributes methodAttributes, ResourceMetadata resourceMetadata,
			DataRestRepository dataRestRepository) {
		MethodParameter methodParameterReturn = handlerMethod.getReturnType();
		ApiResponses apiResponses;
		// check if @ApiResponse(s) is available on from @Operation annotation or method level
		Set<io.swagger.v3.oas.annotations.responses.ApiResponse> responsesArray = genericResponseService.getApiResponses(methodResourceMapping.getMethod());
		if (!responsesArray.isEmpty() || !CollectionUtils.isEmpty(operation.getResponses())) {
			apiResponses = genericResponseService.build(openAPI.getComponents(), new HandlerMethod(methodResourceMapping.getMethod().getDeclaringClass(), methodResourceMapping.getMethod()), operation, methodAttributes);
		}
		else {
			// Construct default response
			apiResponses = new ApiResponses();
			ApiResponse apiResponse = new ApiResponse();
			Type returnType = findSearchReturnType(methodResourceMapping, domainType);
			Content content = genericResponseService.buildContent(openAPI.getComponents(), methodParameterReturn.getParameterAnnotations(), methodAttributes.getMethodProduces(), null, returnType);
			springDocDataRestUtils.buildTextUriContent(content);
			apiResponse.setContent(content);
			addResponse200(apiResponses, apiResponse);
			addResponse404(apiResponses);
		}
		operation.setResponses(apiResponses);
	}
Build search response.

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