class WebhookCustomizer implements CamelKIntegrationCustomizer {

    @Override
    public Integration customize(IntegrationDeployment deployment, Integration integration, EnumSet<Exposure> exposure) {
        IntegrationSpec.Builder spec = new IntegrationSpec.Builder();
        if (integration.getSpec() != null) {
            spec = spec.from(integration.getSpec());
        }

        if (!CamelKSupport.isWebhookPresent(deployment.getSpec())) {
            return integration;
        }

        try {
            spec.addConfiguration(
                new ConfigurationSpec.Builder()
                    .type("property")
                    .value("customizer.platform-http.path=/webhook/")
                    .build()
            );
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }

        integration.setSpec(spec.build());

        return integration;
    }

}