gnodet-bot commented on code in PR #31155:
URL: https://github.com/apache/camel/pull/31155#discussion_r4751182024
##########
components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java:
##########
@@ -125,78 +126,112 @@ public final class RestOpenApiEndpoint extends
DefaultEndpoint {
*/
Map<String, Object> parameters = Collections.emptyMap();
- @UriParam(description = "API basePath, for example \"`/v3`\". Default is
unset, if set overrides the value present in"
- + " OpenApi specification and in the component
configuration.",
+ @UriParam(description = "The base path of the API, for example `/v3`: the
producer puts it before the path of the operation, "
+ + "and the consumer serves the operations under
it. When not set: the component option, then the "
+ + "context path of the REST configuration, then
the path of the servers URL in the specification, then "
+ + "`/`.",
label = "common")
private String basePath;
- @UriParam(description = "Name of the Camel component that will perform the
requests. The component must be present"
- + " in Camel registry and it must implement
RestProducerFactory service provider interface. If not set"
- + " CLASSPATH is searched for single component
that implements RestProducerFactory SPI. Overrides"
- + " component configuration.",
+ @UriParam(description = "Name of the component that sends the HTTP
requests of the producer, which must implement "
+ + "RestProducerFactory, such as http, vertx-http,
undertow or netty-http; it is looked up in the "
+ + "registry, then as a component. When not set:
the component option, then the producerComponent of the"
+ + " REST configuration, then the first component
in the CamelContext that implements "
+ + "RestProducerFactory, then the only
RestProducerFactory in the registry, then the first of http, "
+ + "vertx-http, undertow and netty-http on the
classpath.",
label = "producer,advanced")
private String componentName;
- @UriParam(description = "Name of the Camel component that will service the
requests. The component must be present"
- + " in Camel registry and it must implement
RestOpenApiConsumerFactory service provider interface. If not set"
- + " CLASSPATH is searched for single component
that implements RestOpenApiConsumerFactory SPI. Overrides"
- + " component configuration.",
+ @UriParam(description = "Name of the component that receives the HTTP
requests of the consumer, which must implement "
+ + "RestOpenApiConsumerFactory, such as
platform-http; it is looked up in the registry, then as a "
+ + "component. When not set: the component option,
then the first component in the CamelContext that "
+ + "implements RestOpenApiConsumerFactory, then
platform-http if it is on the classpath, then the only "
+ + "RestOpenApiConsumerFactory in the registry.",
label = "consumer,advanced")
private String consumerComponentName;
- @UriParam(description = "Scheme hostname and port to direct the HTTP
requests to in the form of"
- + " `http[s]://hostname[:port]`. Can be configured
at the endpoint, component or in the corresponding"
- + " REST configuration in the Camel Context. If
you give this component a name (e.g. `petstore`) that"
- + " REST configuration is consulted first,
`rest-openapi` next, and global configuration last. If set"
- + " overrides any value found in the OpenApi
specification, RestConfiguration. Overrides all other "
- + " configuration.",
+ @UriParam(description = "The scheme, host and optional port of the server
the producer calls, in the form "
+ + "`http[s]://hostname[:port]`. When not set: the
component option, then an absolute URL of the servers"
+ + " of the operation or of the specification (with
the default values of the server variables), then "
+ + "the scheme, host and port of the REST
configuration, then the scheme, host and port of an http or "
+ + "https specificationUri. The producer fails to
start when none of them gives a host.",
label = "producer")
private String host;
- @UriPath(description = "ID of the operation from the OpenApi
specification. This is required when using producer",
+ @UriPath(description = "The operationId of the operation in the
specification that the producer calls. Required for the "
+ + "producer, which fails to start when the
specification has no such operation. The consumer does not "
+ + "use it: it serves all operations of the
specification. In the URI it follows `#`, or stands alone "
+ + "when the path does not end with .json, .yaml or
.yml.",
label = "producer")
private String operationId;
- @UriParam(description = "What payload type this component capable of
consuming. Could be one type, like `application/json`"
- + " or multiple types as `application/json,
application/xml; q=0.5` according to the RFC7231. This equates"
- + " or multiple types as `application/json,
application/xml; q=0.5` according to the RFC7231. This equates"
- + " to the value of `Accept` HTTP header. If set
overrides any value found in the OpenApi specification and."
- + " in the component configuration",
+ @UriParam(description = "The media types the producer accepts in the
response, which it sets as the Accept header when the "
+ + "message has none, such as `application/json` or
`application/json, application/xml;q=0.5` (RFC "
+ + "7231). When not set: the component option, then
the content types of the responses of the operation "
+ + "in the specification. The consumer does not use
it.",
label = "consumer")
Review Comment:
🔍 **Label mismatch**: the new description says *"The consumer does not use
it"* but the annotation still has `label = "consumer"`. This field is
producer-only — it sets the `Accept` header on outgoing requests. The label
should be `label = "producer"` (or `"producer,advanced"` to match the
component-level `consumes` field).
```suggestion
label = "producer")
```
--
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]