gnodet-bot commented on code in PR #28670:
URL: https://github.com/apache/camel/pull/28670#discussion_r4413313243


##########
components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/OpenApiExternalReferences.java:
##########
@@ -484,9 +494,8 @@ private void inside(
             }
             String origin = where(ref, path, name);
             lookups.add(new Lookup(uri, document, document != null ? document 
: LOCAL_URI, origin));
-            if (document != null) {
-                targets.add(new Target(document, fragment, ref, origin, ids, 
holder));
-            }
+            // the parser takes only the part the reference selects, under the 
$ids of the schemas enclosing the reference

Review Comment:
   💡 **Sync with `camel-openapi-java`:** The equivalent position in 
`camel-openapi-java` has a 3-line comment that includes both the WHAT and the 
WHY:
   
   ```suggestion
               // always add the target, also for an in-spec #-reference 
(document is null, so LOCAL_URI stands for the
               // specification root); a document != null guard here used to 
drop those references unchecked
               // the parser takes only the part the reference selects, under 
the $ids of the schemas enclosing the reference
   ```
   
   The first two lines (explaining why the `document != null` guard was 
removed) were addressed in `camel-openapi-java` but not copied here.



-- 
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]

Reply via email to