public ApiResponses build(Components components, HandlerMethod handlerMethod, Operation operation,
			MethodAttributes methodAttributes) {
		Map<String, ApiResponse> genericMapResponse = getGenericMapResponse(handlerMethod);
		if (springDocConfigProperties.isOverrideWithGenericResponse()) {
			genericMapResponse = filterAndEnrichGenericMapResponseByDeclarations(handlerMethod, genericMapResponse);
		}
		ApiResponses apiResponses = methodAttributes.calculateGenericMapResponse(genericMapResponse);
		//Then use the apiResponses from documentation
		ApiResponses apiResponsesFromDoc = operation.getResponses();
		if (!CollectionUtils.isEmpty(apiResponsesFromDoc))
			apiResponsesFromDoc.forEach(apiResponses::addApiResponse);
		// for each one build ApiResponse and add it to existing responses
		// Fill api Responses
		computeResponseFromDoc(components, handlerMethod.getReturnType(), apiResponses, methodAttributes, springDocConfigProperties.isOpenapi31(), methodAttributes.getLocale());
		buildApiResponses(components, handlerMethod.getReturnType(), apiResponses, methodAttributes);
		return apiResponses;
	}
Build api responses.

@param components       the components
@param handlerMethod    the handler method
@param operation        the operation
@param methodAttributes the method attributes
@return the api responses
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericResponseService.java