protected void calculateWebhooks(OpenAPI calculatedOpenAPI, Locale locale) {
		Webhooks[] webhooksAttr = openAPIService.getWebhooks();
		if (ArrayUtils.isEmpty(webhooksAttr))
			return;
		var webhooks = Arrays.stream(webhooksAttr).map(Webhooks::value).flatMap(Arrays::stream).toArray(Webhook[]::new);
		Arrays.stream(webhooks).forEach(webhook -> {
			io.swagger.v3.oas.annotations.Operation apiOperation = webhook.operation();
			Operation operation = new Operation();
			MethodAttributes methodAttributes = new MethodAttributes(springDocConfigProperties.getDefaultConsumesMediaType(),
					springDocConfigProperties.getDefaultProducesMediaType(), locale);
			operationParser.parse(apiOperation, operation, calculatedOpenAPI, methodAttributes);
			PathItem pathItem = new PathItem().post(operation);
			calculatedOpenAPI.addWebhooks(webhook.name(), pathItem);
		});
	}
Calculate webhooks.

@param calculatedOpenAPI the calculated open api
@param locale            the locale
springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java