gnodet-bot commented on code in PR #27736:
URL: https://github.com/apache/camel/pull/27736#discussion_r4249097399
##########
dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/MetadataHelper.java:
##########
@@ -73,26 +70,32 @@
import org.apache.camel.support.PluginHelper;
import org.apache.camel.support.ResourceHelper;
import org.apache.camel.tooling.maven.MavenDownloaderImpl;
-import org.apache.camel.tooling.model.ComponentModel;
-import org.apache.camel.tooling.model.DataFormatModel;
-import org.apache.camel.tooling.model.LanguageModel;
import org.apache.camel.util.URISupport;
+/**
+ * Reads what the traits need to know of a route source: the endpoints its
routes consume from and send to. The service
+ * trait creates a Kubernetes Service when a route consumes from an http
component or knative, and the knative trait
+ * configures the knative: channels, endpoints and events.
+ * <p/>
+ * Java and XML routes are read into the route model without starting anything
(CAMEL-25592): Java with the Java DSL
+ * parser of camel-java-io, which neither compiles nor runs the source. YAML
routes, Pipes and Kamelets are loaded in a
+ * stubbed CamelContext, as the YAML DSL builds the uri of an endpoint written
with parameters with the component.
+ */
public class MetadataHelper {
public static final String STUB_PATTERN = "*";
- private static final Map<String, BiConsumer<CamelCatalog, SourceMetadata>>
COMPONENT_CUSTOMIZERS;
+ /** The steps that send to a fixed endpoint, which the routes create when
they start. */
+ private static final Set<String> PRODUCERS = Set.of("to", "wireTap");
+
Review Comment:
💡 **Documentation nit:** The existing Javadoc (line 89) describes the field
but doesn't mention that this set intentionally excludes content-enricher EIPs
(`enrich`, `pollEnrich`, `poll`). Those EIPs also reference a fixed endpoint at
route startup, yet aren't included here by design (the `fromModel` method only
extracts `ENDPOINT`-typed nodes via `RouteNodes`, which enrich/pollEnrich/poll
don't emit). A brief note would help future maintainers understand the boundary:
```suggestion
/** The EIP steps that send to a fixed endpoint created when the route
starts.
* Note: content-enricher EIPs (enrich, pollEnrich, poll) are
intentionally excluded
* because they do not emit ENDPOINT-typed RouteNodes and are handled
separately. */
private static final Set<String> PRODUCERS = Set.of("to", "wireTap");
```
--
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]