private void buildTags(Operation operation, HandlerMethod handlerMethod,
			DataRestRepository dataRestRepository, Method method) {
		String tagName = handlerMethod.getBeanType().getSimpleName();
		if (SpringRepositoryRestResourceProvider.REPOSITORY_SCHEMA_CONTROLLER.equals(handlerMethod.getBeanType().getName())
				|| AlpsController.class.equals(handlerMethod.getBeanType())
				|| ProfileController.class.equals(handlerMethod.getBeanType())) {
			tagName = ProfileController.class.getSimpleName();
			operation.addTagsItem(OpenAPIService.splitCamelCase(tagName));
		}
		else {
			Class<?> domainType = dataRestRepository.getDomainType();
			Set<Tag> tags = new HashSet<>();
			Set<String> tagsStr = new HashSet<>();
			Class<?> repositoryType = dataRestRepository.getRepositoryType();
			openAPIService.buildTagsFromClass(repositoryType, tags, tagsStr, dataRestRepository.getLocale());
			if (!CollectionUtils.isEmpty(tagsStr))
				tagsStr.forEach(operation::addTagsItem);
			else {
				tagName = tagName.replace("Repository", domainType.getSimpleName());
				operation.addTagsItem(OpenAPIService.splitCamelCase(tagName));
			}
			final SecurityService securityParser = openAPIService.getSecurityParser();
			Set<io.swagger.v3.oas.annotations.security.SecurityRequirement> allSecurityTags = securityParser.getSecurityRequirementsForClass(repositoryType);
			if (method != null)
				allSecurityTags = securityParser.getSecurityRequirementsForMethod(method, allSecurityTags);
			if (!CollectionUtils.isEmpty(allSecurityTags))
				securityParser.buildSecurityRequirement(allSecurityTags.toArray(new io.swagger.v3.oas.annotations.security.SecurityRequirement[0]), operation);
		}
	}
Build tags.

@param operation          the operation
@param handlerMethod      the handler method
@param dataRestRepository the repository data rest
@param method             the method
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestTagsService.java