Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.13.0, 3.14.0
-
None
-
Unknown
Description
After upgrading to 3.14.0 I got this error then calling an open api from a route:
Invalid url: /camel/api/v1/register. If you are forwarding/bridging http endpoints, then enable the bridgeEndpoint option on the endpoint: http://localhost:8093/s-smtp/v1/email?httpMethod=POST
The endpoint used in the route looks like this:
.to("s-smtp:SendEmail?authUsername={{api.client-id}}&authPassword={{api.client-secret}}&authenticationPreemptive=true&throwExceptionOnFailure=false&bridgeEndpoint=true")
After debugging I found that the cause of this is found on line 533 in RestOpenApiEndpoint:
// Add rest endpoint parameters if (this.parameters != null && operation.getParameters() != null) { for (Map.Entry<String, Object> entry : this.parameters.entrySet()) { for (OasParameter param : operation.getParameters()) { // skip parameters that are part of the operation as path as otherwise // it will be duplicated as query parameter as well boolean clash = "path".equals(param.in) && entry.getKey().equals(param.getName()); if (!clash) { nestedParameters.put(entry.getKey(), entry.getValue()); } } } }
If the operation in question don't have any parameters this.parameters will never be added to the underlying endpoint.
Found this change in this commit:
Attachments
Issue Links
- links to