Copilot commented on code in PR #26755:
URL: https://github.com/apache/camel/pull/26755#discussion_r4078315343
##########
components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiHelper.java:
##########
@@ -124,9 +124,9 @@ public static String determineBasePath(
}
// openapi spec should be last, as all the above can override the
configuration
- if (openAPI != null) {
+ if (openAPI != null && openAPI.getServers() != null &&
!openAPI.getServers().isEmpty()) {
String specificationBasePath =
RestOpenApiHelper.getBasePathFromOpenApi(openAPI);
- if (isNotEmpty(specificationBasePath)) {
+ if (specificationBasePath != null) {
return specificationBasePath;
Review Comment:
AI-generated review on behalf of the human operator: This change updates
`RestOpenApiHelper.determineBasePath`, but the regression test only calls
`RestOpenApiEndpoint.determineBasePath` and never exercises this new
empty-string branch. `OpenApiRestClientRequestValidator` calls the helper
directly, so add a focused assertion for the helper as well; otherwise the two
base-path decisions can regress independently while the test still passes.
--
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]