davsclaus opened a new pull request, #24782: URL: https://github.com/apache/camel/pull/24782
## Summary _Claude Code on behalf of davsclaus_ - Fix `RestOpenApiProcessor` lifecycle management that became dead code after the advice conversion in CAMEL-22742 - Add `doStop()` to `RestOpenApiEndpoint` to stop the per-consumer `RestOpenApiProcessor` (stops per-operation `RestBindingAdvice` bindings and clears paths) - Add `doStop()` to `RestOpenApiComponent` to stop the shared `RestOpenapiProcessorStrategy` (stops the `ProducerCache` and removes stale HTTP endpoint registrations from `PlatformHttpComponent`) ### Problem Commit `bd63a7eb8213` (CAMEL-22742) moved `RestOpenApiProcessor` out of the consumer's processor chain into a `RestOpenApiProcessorAdvice` added via `ip.addAdvice()`. Previously `DefaultConsumer` drove the processor's lifecycle; advices get no lifecycle management, so `doInit()`/`doStop()` on `RestOpenApiProcessor` became dead code. Consequences: - `DefaultRestOpenapiProcessorStrategy.doStop()` never runs: producer cache is never stopped and `PlatformHttpComponent.removeHttpEndpoint()` is never called - Stale HTTP endpoint registrations accumulate on route reload (e.g. `camel-jbang --dev`) - Per-operation `RestBindingAdvice` services are never stopped ### Fix - `RestOpenApiEndpoint` now tracks the `RestOpenApiProcessor` it creates and stops it in `doStop()`, which in turn stops the per-operation bindings - `RestOpenApiComponent` now stops the shared `restOpenapiProcessorStrategy` in `doStop()`, which stops the producer cache and removes HTTP endpoint registrations ## Test plan - [x] All 135 existing `camel-rest-openapi` tests pass - [ ] Manual verification with `camel-jbang --dev` route reload to confirm stale registrations are cleaned up Co-Authored-By: Claude Opus 4.6 <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
