[Backport 4.8.x] Fix for RestOpenApiProcessor for parsing path variables from the http…#16346
Conversation
… request uri succesfully. (apache#16220) * Update RestOpenApiProcessor.java if uri is not starting with slash then remove the slash in the consumerPath from the openApi spec, because if there is any path variables (/../{id}) in the consumerPath and the uri does not start with "/" then HttpHelper.evalPlaceholders method throws an ArrayIndexOutOfBoundsException. * code style fixes and added null check the uri.
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
|
There are tests failure in Camel JBang plugins which are not related to this PR. @oscerd is it fine to merge anyway given the problems are not within this PR? not sure the policy we're adapting here in the core. Thanks. |
… request uri succesfully. (#16220)
if uri is not starting with slash then remove the slash in the consumerPath from the openApi spec, because if there is any path variables (/../{id}) in the consumerPath and the uri does not start with "/" then HttpHelper.evalPlaceholders method throws an ArrayIndexOutOfBoundsException.
Description
Target
camel-3.x, whereas Camel 4 uses themainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.