Skip to content

CAMEL-25887: camel-rest-openapi - option to restrict the external references of the OpenAPI specification - #28183

Open
oscerd wants to merge 5 commits into
apache:mainfrom
oscerd:feature/CAMEL-25887-openapi-external-references
Open

oscerd wants to merge 5 commits into
apache:mainfrom
oscerd:feature/CAMEL-25887-openapi-external-references

Conversation

@oscerd

@oscerd oscerd commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

CAMEL-25887: RestOpenApiEndpoint.loadSpecificationFrom() parses the specification with setResolveFully(true), so swagger-parser loads every external $ref when the consumer or producer is created: files from the working directory and the classpath, and documents over http(s) when the reference is a URL or the specification itself comes from a URL. The component had no option to restrict this, and the component page did not mention it. The same applies to RestOpenApiReader in camel-openapi-java, which parses the contract of a contract-first REST DSL with readContents(String) (resolve on by default) to serve it as api-doc.

What

  • externalReferences option on the rest-openapi endpoint and component, and on the openApi element of the REST DSL (OpenApiDefinition, passed to the consumer URI by RestDefinition):
    • all (default, the current behaviour) allows any reference;
    • local allows references to the classpath and the file system only; a specification loaded from a URL may then reference no other document at all, because the parser resolves its references against that URL;
    • none allows only references inside the document.
  • The check runs before the parser resolves anything (OpenApiExternalReferences), and follows the parser's own rules so that what it allows is what the parser then does:
    • it scans the tree the parser resolves, DeserializationUtils.deserializeIntoTree (SnakeYAML, YAML aliases expanded, the parser's alias limits applied), so an alias of a URL is seen as the URL;
    • it resolves every $ref against the document that contains it: ExternalRefProcessor.join(document, ref) for OpenAPI 3.0, and for OpenAPI 3.1 ReferenceUtils.toBaseURI(resolve(ref, base)) where base is the chain of the enclosing $ids as OpenAPI31Traverser.traverseSchema builds it (root base local, the URI the parser gives a specification without location). The $ids enclosing a reference are carried into the document it leads to, as ReferenceVisitor.resolveSchemaRef carries them, and folded against that document's URI before its own $ids apply, so an absolute $id above $ref: file:///…/bridge.yaml still decides what owner.yaml inside bridge.yaml resolves to. A #… reference stays inside the document, also below an $id, since the parser registers the $id base before it visits the children;
    • under local it reads the documents it allows the way the parser reads them (file: and classpath: by their path as Visitor.readURI does, anything else with RefUtils.readExternalRef(…, RELATIVE, …, null): working directory, then classpath) and checks their references in turn, keyed by the resolved location plus the inherited $ids; a document that cannot be read fails the check;
    • a specification loaded from a URL is read once (RemoteUrl.urlToString, as readLocation does) and handed to readContents(content, null, options, location), so the default path is unchanged and the restricted path fetches nothing else.
    • A reference the option does not allow fails the consumer or producer creation with a message that names the reference, where it is, the document, and what it resolves to when that differs.
  • api-doc: RestOpenApiReader applies the option of the openApi element, or else the setting of the rest-openapi component (read through bean introspection, since the modules do not depend on each other), so camel.component.rest-openapi.external-references=none covers the contract served as api-doc as well.
  • The checker is a small package-private class that exists in both modules, because neither camel-rest-openapi nor camel-openapi-java depends on the other and adding such a dependency for it seemed wrong. Both copies say so.
  • Docs: a section on the component page and on the contract-first page of the user manual. No upgrade-guide entry, since the default keeps the current behaviour.

Why not swagger-parser's setSafelyResolveURL

It is not a "local only" mode: for an OpenAPI 3.0 document ResolverCache.loadRef() runs the raw reference through PermittedUrlsChecker.verify(), which rejects relative and file references (multi-file specifications) and only lets through http(s) URLs that resolve to public addresses or are on the allow list; for an OpenAPI 3.1 document only ReferenceVisitor.readHttp() is gated; and a rejected reference only becomes a parser message, which would need to be told apart from the other messages CAMEL-25747 now logs.

Tests

RestOpenApiExternalReferencesTest (camel-rest-openapi, WireMock stands in for every URL so that a test can assert that nothing was fetched):

  • the default and local resolve a classpath reference; none rejects a reference to another document, in an OpenAPI 3.0 and a 3.1 document, and accepts a self-contained one;
  • local rejects an http reference without a request; finds a remote reference in a referenced document, in a document in a subdirectory (resolved next to the document that references it) and in a document referenced by absolute path; fails when a referenced document cannot be read, where the default lets the parser report it;
  • YAML aliases: none rejects a $ref given as the alias *#remote, local an ordinary alias, both without a request; the default expands the alias and fetches (one request);
  • OpenAPI 3.1: local rejects $ref: owner.yaml below $id: http://…/schemas/ (zero requests) where the default fetches /schemas/owner.yaml (one request); the same across a reference edge, $id above $ref: file:///…/bridge.yaml whose owner.yaml has a benign sibling (zero requests, and the default fetches it from the $id host); none allows #/components/schemas/Owner below that $id and the parser makes no request; local reads a file: reference and rejects the http reference inside it, and allows a clean one;
  • a specification loaded from a URL: local rejects every external reference (one request for the root, none for the reference), the default resolves them, none allows a self-contained one;
  • an unknown value is rejected; the endpoint option and the component option both apply to the producer.

RestOpenApiReaderExternalReferencesTest (camel-openapi-java): the default resolves the referenced document into the api-doc; the openApi element's none and the component's setting both fail the read; the subdirectory, $id, inherited-$id (through a classpath:/// bridge) and alias cases above are rejected (the contracts reference a host that does not exist; the check runs before the parser).

The existing tests of both modules pass (213 and 106).

Noticed, not changed

RestOpenApiSupport.getBasePathFromOasDocument() (camel-openapi-java) throws IllegalArgumentException: URI is not absolute for a contract without a servers entry, because swagger-parser then adds a server with the url / and URI.create("/").toURL() throws that, not the MalformedURLException the method catches. CAMEL-24825 fixed the same symptom on the consumer side (RestOpenApiEndpoint), but the api-doc of such a contract still fails. The test contracts here declare a server for that reason; the bug deserves its own issue.

Claude Code on behalf of oscerd

🤖 Generated with Claude Code

…erences of the OpenAPI specification

The parser loads every external $ref of the specification when the consumer or producer is created,
from the working directory and the classpath or over http(s), and the api-doc of a contract-first
REST DSL resolves them as well. The new externalReferences option (all, local, none) on the
rest-openapi endpoint and component and on the openApi element of the REST DSL checks the references
before the parser resolves them, in the specification and in the local documents it references, and
fails the start with a message that names a reference the option does not allow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

🌟 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:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice work, and a good call to check before the parser runs rather than lean on setSafelyResolveURL. The default all keeps today's behaviour, which fits the security model (the spec is route configuration), so no upgrade-guide entry is needed. Three things before it can go in:

  1. local can still reach http(s) in two cases, because the checker reads nested documents differently from the parser and skips any document it cannot read (inline comments):
    • a referenced document in a subdirectory: the parser resolves its relative refs against that document (ExternalRefProcessor.join(externalFile, ref)), the checker against the working directory/classpath root, so it usually finds nothing and moves on;
    • OpenAPI 3.1 $id: OpenAPI31Traverser.traverseSchema / ReferenceVisitor.resolveSchemaRef resolve a relative $ref against the enclosing schemas' $id, so $id: https://host/schemas/ + $ref: owner.json fetches https://host/schemas/owner.json while the checker sees a relative file ref.
      (none is not affected: it rejects every ref that does not start with #.)
  2. Catalog not regenerated: catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json is missing the new externalReferences attribute of openApi (the copy under dsl/camel-yaml-dsl has it), so CI's uncommitted-changes check will trip. Rebuilding catalog/camel-catalog should fix it.
  3. Minor: RefUtils.readExternalRef(String, RefFormat, List, Path) is deprecated in swagger-parser 2.1.48; the 5-arg overload with a null PermittedUrlsChecker does the same thing.

Items 1 and 3 apply to the copy in camel-openapi-java as well.

Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

@luigidemasi luigidemasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes on commit 152edec881765f17506e184e3f871564377588f8.

The additional HTTP probes confirm that none is also bypassable, through YAML aliases. I also reproduced the previously reported nested-reference and OpenAPI 3.1 $id problems, plus an OpenAPI 3.1 file: reference case. The inline comments describe the three policy defects and the missing generated catalog update. All three policy defects affect both the rest-openapi endpoint and the api-doc reader's copy of the checker.

Validation:

  • Built the scoped reactor with dependencies from the exact PR checkout, then ran both complete module suites: 199 camel-rest-openapi tests and 102 camel-openapi-java tests passed, with no failures, errors or skips.
  • Loopback HTTP probes reproduced five bypass cases on both call paths: nested relative references, schema $id, ordinary YAML aliases under local, hash-prefixed YAML aliases under none, and OpenAPI 3.1 file: references. Each made one prohibited HTTP request and completed successfully. Direct HTTP-reference controls were rejected with zero requests.
  • Negating checked.add(file) in an isolated copy caused localChecksTheDocumentsTheSpecificationReferences to fail; the original focused suite passed all 13 tests.
  • Hosted Java 21/25 builds, documentation validation and license check remain queued. Dependency review passed; Sonar was skipped. A full-repository build was not run.

AI-generated review by Codex on behalf of Luigi De Masi (@luigidemasi).

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Generated files are up to date

An earlier CI run reported uncommitted generated changes; the latest run no longer does.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security feature with good test coverage for the happy path, but several issues need addressing before this can be merged.

P1 — Security bypasses

1. YAML alias bypass

readTree() in both copies uses Yaml.mapper().readTree() (SnakeYAML/Jackson by default), which expands YAML aliases before the JSON tree is handed to scan(). A document like:

base: &anchor
  $ref: 'http://evil.example.com/steal'
paths:
  /foo:
    get: *anchor

will deliver the resolved $ref node to scan() — but it can also be used to create alias-based billion-laughs bombs before scan() is even called. Since this is a security feature, the YAML parsing should use an alias-disabling mapper.

2. readLocalDocument resolves against CWD, not the containing document's directory

Both copies call RefUtils.readExternalRef(file, RefFormat.RELATIVE, null, new File(".").toPath()). The base path is the JVM working directory, not the directory that contains the referencing document. Given a spec at /etc/camel/specs/petstore.yaml with $ref: '../secrets/private.yaml', the checker resolves it relative to . (wherever the JVM was launched) rather than /etc/camel/specs/. This silently misclassifies references (they fail to load, fall through to the catch (RuntimeException) silent-null path) OR resolves to an unrelated file if the relative path happens to exist under CWD.

3. $id base URI not tracked

scan() only follows $ref keys. JSON Schema documents can redefine the resolution base URI with $id. A clever specification can point $id at an external origin and then use internal-looking $ref values that resolve externally once the base URI shift is applied. The checker currently has no awareness of $id and will classify such references as "local" when they are in fact remote.

P2 — Operational issues

4. Silent document drop in readLocalDocument

The catch (RuntimeException) block logs at DEBUG and returns null. When the caller sees null, it silently skips checking that document's references. If a spec refers to a file that exists but is unreadable (permissions, locked, corrupt), the security check passes with no warning to the user. This should log at WARN and/or propagate an exception so the operator knows a document could not be validated.

5. isHttp() does not handle file: URIs

isHttp() only checks http: and https: prefixes. A file: URI (e.g. $ref: 'file:///etc/passwd') will fall through to the local-document branch and be read as a local file — which may be intentional for local policy but seems surprising for none policy. If file: URIs are intentionally treated as local references, this should be explicitly documented.

Non-blocking observations

  • externalReferences propagation in createEndpoint(): endpoint.setExternalReferences(getExternalReferences()) propagates unconditionally. This is correct (the endpoint's own value overrides at configuration time if set), but worth verifying the precedence semantics are as intended.
  • Both OpenApiExternalReferences.java copies are structurally identical. It would reduce maintenance burden to keep only one implementation or factor the shared logic into a common utility.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-openapi-java
  • components/camel-rest-openapi
  • core/camel-core-model
  • core/camel-java-io
  • core/camel-xml-io
  • core/camel-yaml-io
  • docs
  • dsl/camel-componentdsl
  • dsl/camel-endpointdsl
  • dsl/camel-jbang/camel-jbang-core
  • dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers
  • dsl/camel-yaml-dsl/camel-yaml-dsl

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.


🔬 Scalpel shadow comparison — Scalpel: 567 of 707 tested, 20 compile-only — current: 567 all tested

Maveniverse Scalpel detected 567 affected modules (current approach: 567).

Skip-tests mode would test 567 modules (13 direct + 561 downstream), skip tests for 20 (generated code, meta-modules)

Modules Scalpel would test (567)
  • archetypes ← downstream of org.apache.camel:camel-test-junit6
  • camel-a2a ← downstream of org.apache.camel:camel-core-model
  • camel-activemq ← downstream of org.apache.camel:camel-core-model
  • camel-activemq6 ← downstream of org.apache.camel:camel-core-model
  • camel-ai-observability ← downstream of org.apache.camel:camel-core-model
  • camel-ai-observability-api ← downstream of org.apache.camel:camel-core-model
  • camel-ai-parent ← downstream of org.apache.camel:camel-core-model
  • camel-ai-resource ← downstream of org.apache.camel:camel-core-model
  • camel-ai-tool ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-common ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-eventbridge ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-fc ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-kms ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-mns ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-oss ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-ots ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-parent ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-sls ← downstream of org.apache.camel:camel-core-model
  • camel-alibaba-sms ← downstream of org.apache.camel:camel-core-model
  • camel-amqp ← downstream of org.apache.camel:camel-core-model
  • camel-api-component-maven-plugin ← downstream of org.apache.camel:camel-test-junit6
  • camel-arangodb ← downstream of org.apache.camel:camel-core-model
  • camel-archetype-api-component ← downstream of org.apache.camel:camel-test-junit6
  • camel-archetype-component ← downstream of org.apache.camel:camel-test-junit6
  • camel-archetype-dataformat ← downstream of org.apache.camel:camel-test-junit6
  • camel-archetype-java ← downstream of org.apache.camel:camel-test-junit6
  • camel-archetype-main ← downstream of org.apache.camel:camel-test-junit6
  • camel-as2 ← downstream of org.apache.camel:camel-core-model
  • camel-as2-api ← downstream of org.apache.camel:camel-core-model
  • camel-as2-parent ← downstream of org.apache.camel:camel-core-model
  • camel-asn1 ← downstream of org.apache.camel:camel-core-model
  • camel-asterisk ← downstream of org.apache.camel:camel-core-model
  • camel-atmosphere-websocket ← downstream of org.apache.camel:camel-core-model
  • camel-atom ← downstream of org.apache.camel:camel-core-model
  • camel-attachments ← downstream of org.apache.camel:camel-core-model
  • camel-avro ← downstream of org.apache.camel:camel-core-model
  • camel-avro-rpc ← downstream of org.apache.camel:camel-core-model
  • camel-avro-rpc-jetty ← downstream of org.apache.camel:camel-core-model
  • camel-avro-rpc-parent ← downstream of org.apache.camel:camel-core-model
  • camel-avro-rpc-spi ← downstream of org.apache.camel:camel-core-model
  • camel-aws-bedrock ← downstream of org.apache.camel:camel-core-model
  • camel-aws-cloudtrail ← downstream of org.apache.camel:camel-core-model
  • camel-aws-common ← downstream of org.apache.camel:camel-core-model
  • camel-aws-config ← downstream of org.apache.camel:camel-core-model
  • camel-aws-parameter-store ← downstream of org.apache.camel:camel-core-model
  • camel-aws-parent ← downstream of org.apache.camel:camel-core-model
  • camel-aws-secrets-manager ← downstream of org.apache.camel:camel-core-model
  • camel-aws-security-hub ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-athena ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-comprehend ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-cw ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-ddb ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-ec2 ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-ecs ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-eks ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-eventbridge ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-iam ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-kinesis ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-kms ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-lambda ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-mq ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-msk ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-polly ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-redshift ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-rekognition ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-s3 ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-s3-vectors ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-ses ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-sns ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-sqs ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-step-functions ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-sts ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-textract ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-timestream ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-transcribe ← downstream of org.apache.camel:camel-core-model
  • camel-aws2-translate ← downstream of org.apache.camel:camel-core-model
  • camel-azure-common ← downstream of org.apache.camel:camel-core-model
  • camel-azure-cosmosdb ← downstream of org.apache.camel:camel-core-model
  • camel-azure-eventgrid ← downstream of org.apache.camel:camel-core-model
  • camel-azure-eventhubs ← downstream of org.apache.camel:camel-core-model
  • camel-azure-files ← downstream of org.apache.camel:camel-core-model
  • camel-azure-functions ← downstream of org.apache.camel:camel-core-model
  • camel-azure-key-vault ← downstream of org.apache.camel:camel-core-model
  • camel-azure-parent ← downstream of org.apache.camel:camel-core-model
  • camel-azure-schema-registry ← downstream of org.apache.camel:camel-core-model
  • camel-azure-servicebus ← downstream of org.apache.camel:camel-core-model
  • camel-azure-storage-blob ← downstream of org.apache.camel:camel-core-model
  • camel-azure-storage-datalake ← downstream of org.apache.camel:camel-core-model
  • camel-azure-storage-queue ← downstream of org.apache.camel:camel-core-model
  • camel-barcode ← downstream of org.apache.camel:camel-core-model
  • camel-base64 ← downstream of org.apache.camel:camel-core-model
  • camel-bean ← downstream of org.apache.camel:camel-core-model
  • camel-bean-validator ← downstream of org.apache.camel:camel-core-model
  • camel-beanio ← downstream of org.apache.camel:camel-core-model
  • camel-bindy ← downstream of org.apache.camel:camel-core-model
  • camel-bonita ← downstream of org.apache.camel:camel-core-model
  • camel-box ← downstream of org.apache.camel:camel-core-model
  • camel-box-api ← downstream of org.apache.camel:camel-core-model
  • camel-box-parent ← downstream of org.apache.camel:camel-core-model
  • camel-braintree ← downstream of org.apache.camel:camel-core-model
  • camel-browse ← downstream of org.apache.camel:camel-core-model
  • camel-caffeine ← downstream of org.apache.camel:camel-core-model
  • camel-camunda ← downstream of org.apache.camel:camel-core-model
  • camel-cassandraql ← downstream of org.apache.camel:camel-core-model
  • camel-cbor ← downstream of org.apache.camel:camel-core-model
  • camel-chatscript ← downstream of org.apache.camel:camel-core-model
  • camel-chunk ← downstream of org.apache.camel:camel-core-model
  • camel-cli-connector ← downstream of org.apache.camel:camel-test-junit6
  • camel-cli-debug ← downstream of org.apache.camel:camel-cli-connector
  • camel-clickhouse ← downstream of org.apache.camel:camel-core-model
  • camel-clickup ← downstream of org.apache.camel:camel-core-model
  • camel-cloudevents ← downstream of org.apache.camel:camel-core-model
  • camel-cluster ← downstream of org.apache.camel:camel-core-model
  • camel-cm-sms ← downstream of org.apache.camel:camel-core-model
  • camel-coap ← downstream of org.apache.camel:camel-core-model
  • camel-cometd ← downstream of org.apache.camel:camel-core-model
  • camel-console ← downstream of org.apache.camel:camel-core
  • camel-consul ← downstream of org.apache.camel:camel-core-model
  • camel-controlbus ← downstream of org.apache.camel:camel-core-model
  • camel-core ← downstream of org.apache.camel:camel-xml-io
  • camel-core-all ← downstream of org.apache.camel:camel-core-model
  • camel-core-engine ← downstream of org.apache.camel:camel-core-model
  • camel-core-languages ← downstream of org.apache.camel:camel-core-model
  • camel-core-model ← core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/rest/openApi.json, core/camel-core-model/src/main/java/org/apache/camel/model/rest/OpenApiDefinition.java, core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
  • camel-core-reifier ← downstream of org.apache.camel:camel-core-model
  • camel-core-xml ← downstream of org.apache.camel:camel-core-engine
  • camel-couchbase ← downstream of org.apache.camel:camel-core-model
  • camel-couchdb ← downstream of org.apache.camel:camel-core-model
  • camel-cron ← downstream of org.apache.camel:camel-core-model
  • camel-crypto ← downstream of org.apache.camel:camel-core-model
  • camel-crypto-pgp ← downstream of org.apache.camel:camel-core-model
  • camel-csv ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-common ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-parent ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-rest ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-soap ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-spring-common ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-spring-rest ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-spring-soap ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-spring-transport ← downstream of org.apache.camel:camel-core-model
  • camel-cxf-transport ← downstream of org.apache.camel:camel-core-model
  • camel-cyberark-vault ← downstream of org.apache.camel:camel-core-model
  • camel-dapr ← downstream of org.apache.camel:camel-core-model
  • camel-dataformat ← downstream of org.apache.camel:camel-core-model
  • camel-dataset ← downstream of org.apache.camel:camel-core-model
  • camel-datasonnet ← downstream of org.apache.camel:camel-core-model
  • camel-dataweave ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-common ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-common-parent ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-db2 ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-maven-plugin ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-mongodb ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-mysql ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-oracle ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-parent ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-postgres ← downstream of org.apache.camel:camel-core-model
  • camel-debezium-sqlserver ← downstream of org.apache.camel:camel-core-model
  • camel-debug ← downstream of org.apache.camel:camel-core-model
  • camel-dfdl ← downstream of org.apache.camel:camel-core-model
  • camel-dhis2 ← downstream of org.apache.camel:camel-core-model
  • camel-dhis2-api ← downstream of org.apache.camel:camel-core-model
  • camel-dhis2-parent ← downstream of org.apache.camel:camel-core-model
  • camel-diagram ← downstream of org.apache.camel:camel-core-model
  • camel-direct ← downstream of org.apache.camel:camel-core-model
  • camel-disruptor ← downstream of org.apache.camel:camel-core-model
  • camel-djl ← downstream of org.apache.camel:camel-core-model
  • camel-dns ← downstream of org.apache.camel:camel-core-model
  • camel-docker ← downstream of org.apache.camel:camel-core-model
  • camel-docling ← downstream of org.apache.camel:camel-core-model
  • camel-drill ← downstream of org.apache.camel:camel-core-model
  • camel-dropbox ← downstream of org.apache.camel:camel-core-model
  • camel-dsl-modeline ← downstream of org.apache.camel:camel-test-junit6
  • camel-dsl-support ← downstream of org.apache.camel:camel-core-model
  • camel-duckdb ← downstream of org.apache.camel:camel-core-model
  • camel-dynamic-router ← downstream of org.apache.camel:camel-core-model
  • camel-ehcache ← downstream of org.apache.camel:camel-core-model
  • camel-elasticsearch ← downstream of org.apache.camel:camel-core-model
  • camel-elasticsearch-rest-client ← downstream of org.apache.camel:camel-core-model
  • camel-event ← downstream of org.apache.camel:camel-core-model
  • camel-exec ← downstream of org.apache.camel:camel-core-model
  • camel-fastjson ← downstream of org.apache.camel:camel-core-model
  • camel-fhir ← downstream of org.apache.camel:camel-core-model
  • camel-fhir-api ← downstream of org.apache.camel:camel-core-model
  • camel-fhir-parent ← downstream of org.apache.camel:camel-core-model
  • camel-file ← downstream of org.apache.camel:camel-core-model
  • camel-file-watch ← downstream of org.apache.camel:camel-core-model
  • camel-flatpack ← downstream of org.apache.camel:camel-core-model
  • camel-flink ← downstream of org.apache.camel:camel-core-model
  • camel-flowable ← downstream of org.apache.camel:camel-core-model
  • camel-fop ← downstream of org.apache.camel:camel-core-model
  • camel-fory ← downstream of org.apache.camel:camel-core-model
  • camel-freemarker ← downstream of org.apache.camel:camel-core-model
  • camel-ftp ← downstream of org.apache.camel:camel-core-model
  • camel-ftp-common ← downstream of org.apache.camel:camel-core-model
  • camel-geocoder ← downstream of org.apache.camel:camel-core-model
  • camel-git ← downstream of org.apache.camel:camel-core-model
  • camel-github2 ← downstream of org.apache.camel:camel-core-model
  • camel-google-bigquery ← downstream of org.apache.camel:camel-core-model
  • camel-google-calendar ← downstream of org.apache.camel:camel-core-model
  • camel-google-common ← downstream of org.apache.camel:camel-core-model
  • camel-google-drive ← downstream of org.apache.camel:camel-core-model
  • camel-google-firestore ← downstream of org.apache.camel:camel-core-model
  • camel-google-functions ← downstream of org.apache.camel:camel-core-model
  • camel-google-mail ← downstream of org.apache.camel:camel-core-model
  • camel-google-parent ← downstream of org.apache.camel:camel-core-model
  • camel-google-pubsub ← downstream of org.apache.camel:camel-core-model
  • camel-google-secret-manager ← downstream of org.apache.camel:camel-core-model
  • camel-google-sheets ← downstream of org.apache.camel:camel-core-model
  • camel-google-speech-to-text ← downstream of org.apache.camel:camel-core-model
  • camel-google-storage ← downstream of org.apache.camel:camel-core-model
  • camel-google-text-to-speech ← downstream of org.apache.camel:camel-core-model
  • camel-google-vertexai ← downstream of org.apache.camel:camel-core-model
  • camel-google-vision ← downstream of org.apache.camel:camel-core-model
  • camel-graphql ← downstream of org.apache.camel:camel-core-model
  • camel-grok ← downstream of org.apache.camel:camel-core-model
  • camel-groovy ← downstream of org.apache.camel:camel-core-model
  • camel-grpc ← downstream of org.apache.camel:camel-core-model
  • camel-gson ← downstream of org.apache.camel:camel-core-model
  • camel-hashicorp-vault ← downstream of org.apache.camel:camel-core-model
  • camel-hazelcast ← downstream of org.apache.camel:camel-core-model
  • camel-hivemq ← downstream of org.apache.camel:camel-core-model
  • camel-hl7 ← downstream of org.apache.camel:camel-core-model
  • camel-http ← downstream of org.apache.camel:camel-core-model
  • camel-http-base ← downstream of org.apache.camel:camel-core-model
  • camel-http-common ← downstream of org.apache.camel:camel-core-model
  • camel-huawei-parent ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-common ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-dms ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-frs ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-functiongraph ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-iam ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-imagerecognition ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-obs ← downstream of org.apache.camel:camel-core-model
  • camel-huaweicloud-smn ← downstream of org.apache.camel:camel-core-model
  • camel-huggingface ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-cos ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-parent ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-secrets-manager ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-watson-discovery ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-watson-language ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-watson-speech-to-text ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-watson-text-to-speech ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-watsonx-ai ← downstream of org.apache.camel:camel-core-model
  • camel-ibm-watsonx-data ← downstream of org.apache.camel:camel-core-model
  • camel-ical ← downstream of org.apache.camel:camel-core-model
  • camel-iggy ← downstream of org.apache.camel:camel-core-model
  • camel-ignite ← downstream of org.apache.camel:camel-core-model
  • camel-infinispan ← downstream of org.apache.camel:camel-core-model
  • camel-infinispan-common ← downstream of org.apache.camel:camel-core-model
  • camel-infinispan-embedded ← downstream of org.apache.camel:camel-core-model
  • camel-infinispan-parent ← downstream of org.apache.camel:camel-core-model
  • camel-influxdb ← downstream of org.apache.camel:camel-core-model
  • camel-influxdb2 ← downstream of org.apache.camel:camel-core-model
  • camel-iso8583 ← downstream of org.apache.camel:camel-core-model
  • camel-jackson ← downstream of org.apache.camel:camel-core-model
  • camel-jackson-avro ← downstream of org.apache.camel:camel-core-model
  • camel-jackson-protobuf ← downstream of org.apache.camel:camel-core-model
  • camel-jackson3 ← downstream of org.apache.camel:camel-core-model
  • camel-jackson3-avro ← downstream of org.apache.camel:camel-core-model
  • camel-jackson3-protobuf ← downstream of org.apache.camel:camel-core-model
  • camel-jackson3xml ← downstream of org.apache.camel:camel-core-model
  • camel-jacksonxml ← downstream of org.apache.camel:camel-core-model
  • camel-jactl ← downstream of org.apache.camel:camel-core-model
  • camel-jandex ← downstream of org.apache.camel:camel-core-model
  • camel-jasypt ← downstream of org.apache.camel:camel-core-model
  • camel-java-io ← core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java
  • camel-java-joor-dsl ← downstream of org.apache.camel:camel-core-languages
  • camel-javascript ← downstream of org.apache.camel:camel-core-model
  • camel-jaxb ← downstream of org.apache.camel:camel-core-model
  • camel-jbang-console ← downstream of org.apache.camel:camel-management
  • camel-jbang-mcp ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-tui ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-validate ← downstream of org.apache.camel:camel-jbang-core
  • camel-jcache ← downstream of org.apache.camel:camel-core-model
  • camel-jcr ← downstream of org.apache.camel:camel-core-model
  • camel-jdbc ← downstream of org.apache.camel:camel-core-model
  • camel-jetty ← downstream of org.apache.camel:camel-openapi-java
  • camel-jetty-common ← downstream of org.apache.camel:camel-core-model
  • camel-jfr ← downstream of org.apache.camel:camel-core-model
  • camel-jgroups ← downstream of org.apache.camel:camel-core-model
  • camel-jgroups-raft ← downstream of org.apache.camel:camel-core-model
  • camel-jira ← downstream of org.apache.camel:camel-core-model
  • camel-jms ← downstream of org.apache.camel:camel-core-model
  • camel-jmx ← downstream of org.apache.camel:camel-core-model
  • camel-jolt ← downstream of org.apache.camel:camel-core-model
  • camel-jooq ← downstream of org.apache.camel:camel-core-model
  • camel-joor ← downstream of org.apache.camel:camel-core-model
  • camel-jpa ← downstream of org.apache.camel:camel-core-model
  • camel-jq ← downstream of org.apache.camel:camel-core-model
  • camel-jsch ← downstream of org.apache.camel:camel-core-model
  • camel-jslt ← downstream of org.apache.camel:camel-core-model
  • camel-json-validator ← downstream of org.apache.camel:camel-core-model
  • camel-jsonapi ← downstream of org.apache.camel:camel-core-model
  • camel-jsonata ← downstream of org.apache.camel:camel-core-model
  • camel-jsonb ← downstream of org.apache.camel:camel-core-model
  • camel-jsonpath ← downstream of org.apache.camel:camel-core-model
  • camel-jsoup ← downstream of org.apache.camel:camel-core-model
  • camel-jt400 ← downstream of org.apache.camel:camel-core-model
  • camel-jta ← downstream of org.apache.camel:camel-core-model
  • camel-jte ← downstream of org.apache.camel:camel-core-model
  • camel-kafka ← downstream of org.apache.camel:camel-core-model
  • camel-kafka-common ← downstream of org.apache.camel:camel-core-model
  • camel-kafka-share ← downstream of org.apache.camel:camel-core-model
  • camel-kamelet ← downstream of org.apache.camel:camel-core-model
  • camel-kamelet-main-support ← downstream of org.apache.camel:camel-main
  • camel-keycloak ← downstream of org.apache.camel:camel-core-model
  • camel-knative ← downstream of org.apache.camel:camel-core-model
  • camel-knative-api ← downstream of org.apache.camel:camel-core-model
  • camel-knative-http ← downstream of org.apache.camel:camel-core-model
  • camel-knative-parent ← downstream of org.apache.camel:camel-core-model
  • camel-kserve ← downstream of org.apache.camel:camel-core-model
  • camel-kubernetes ← downstream of org.apache.camel:camel-core-model
  • camel-kudu ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-agent ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-agent-api ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-chat ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-core ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-embeddings ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-embeddingstore ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-embeddingstore-api ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-ingest ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-tokenizer ← downstream of org.apache.camel:camel-core-model
  • camel-langchain4j-web-search ← downstream of org.apache.camel:camel-core-model
  • camel-language ← downstream of org.apache.camel:camel-core-model
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
  • camel-ldap ← downstream of org.apache.camel:camel-core-model
  • camel-ldif ← downstream of org.apache.camel:camel-core-model
  • camel-log ← downstream of org.apache.camel:camel-core-model
  • camel-lra ← downstream of org.apache.camel:camel-core-model
  • camel-lucene ← downstream of org.apache.camel:camel-core-model
  • camel-lumberjack ← downstream of org.apache.camel:camel-core-model
  • camel-lzf ← downstream of org.apache.camel:camel-core-model
  • camel-mail ← downstream of org.apache.camel:camel-core-model
  • camel-mail-microsoft-oauth ← downstream of org.apache.camel:camel-core-model
  • camel-main ← downstream of org.apache.camel:camel-core-engine
  • camel-management ← downstream of org.apache.camel:camel-xml-io
  • camel-mapstruct ← downstream of org.apache.camel:camel-core-model
  • camel-master ← downstream of org.apache.camel:camel-core-model
  • camel-maven-plugin ← downstream of org.apache.camel:camel-spring-main
  • camel-mcp-server ← downstream of org.apache.camel:camel-core-model
  • camel-mcp-server-api ← downstream of org.apache.camel:camel-core-model
  • camel-mdc ← downstream of org.apache.camel:camel-core-model
  • camel-metrics ← downstream of org.apache.camel:camel-core-model
  • camel-micrometer ← downstream of org.apache.camel:camel-core-model
  • camel-micrometer-observability ← downstream of org.apache.camel:camel-core-model
  • camel-micrometer-prometheus ← downstream of org.apache.camel:camel-core-model
  • camel-microprofile-config ← downstream of org.apache.camel:camel-core-model
  • camel-microprofile-fault-tolerance ← downstream of org.apache.camel:camel-core-model
  • camel-microprofile-health ← downstream of org.apache.camel:camel-core-model
  • camel-microprofile-parent ← downstream of org.apache.camel:camel-core-model
  • camel-milo ← downstream of org.apache.camel:camel-core-model
  • camel-milvus ← downstream of org.apache.camel:camel-core-model
  • camel-mina ← downstream of org.apache.camel:camel-core-model
  • camel-mina-sftp ← downstream of org.apache.camel:camel-core-model
  • camel-minio ← downstream of org.apache.camel:camel-core-model
  • camel-mllp ← downstream of org.apache.camel:camel-core-model
  • camel-mock ← downstream of org.apache.camel:camel-core-model
  • camel-mongodb ← downstream of org.apache.camel:camel-core-model
  • camel-mongodb-gridfs ← downstream of org.apache.camel:camel-core-model
  • camel-mustache ← downstream of org.apache.camel:camel-core-model
  • camel-mvel ← downstream of org.apache.camel:camel-core-model
  • camel-mybatis ← downstream of org.apache.camel:camel-core-model
  • camel-nats ← downstream of org.apache.camel:camel-core-model
  • camel-neo4j ← downstream of org.apache.camel:camel-core-model
  • camel-netty ← downstream of org.apache.camel:camel-core-model
  • camel-netty-http ← downstream of org.apache.camel:camel-openapi-java
  • camel-oaipmh ← downstream of org.apache.camel:camel-core-model
  • camel-oauth ← downstream of org.apache.camel:camel-core-model
  • camel-observability-services ← downstream of org.apache.camel:camel-core-model
  • camel-observation ← downstream of org.apache.camel:camel-core-model
  • camel-ocsf ← downstream of org.apache.camel:camel-core-model
  • camel-odata ← downstream of org.apache.camel:camel-core-model
  • camel-ognl ← downstream of org.apache.camel:camel-core-model
  • camel-olingo2 ← downstream of org.apache.camel:camel-core-model
  • camel-olingo2-api ← downstream of org.apache.camel:camel-core-model
  • camel-olingo2-parent ← downstream of org.apache.camel:camel-core-model
  • camel-olingo4 ← downstream of org.apache.camel:camel-core-model
  • camel-olingo4-api ← downstream of org.apache.camel:camel-core-model
  • camel-olingo4-parent ← downstream of org.apache.camel:camel-core-model
  • camel-once ← downstream of org.apache.camel:camel-core-model
  • camel-opa ← downstream of org.apache.camel:camel-core-model
  • camel-openai ← downstream of org.apache.camel:camel-core-model
  • camel-openapi-java ← components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenApiExternalReferences.java, components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java, components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderExternalReferencesTest.java, components/camel-openapi-java/src/test/resources/external-references-31-bridge.yaml, components/camel-openapi-java/src/test/resources/external-references-31-id.yaml, components/camel-openapi-java/src/test/resources/external-references-31-inherited-id.yaml, components/camel-openapi-java/src/test/resources/external-references-alias.yaml, components/camel-openapi-java/src/test/resources/external-references-pet.yaml, components/camel-openapi-java/src/test/resources/external-references-subdir-remote.yaml, components/camel-openapi-java/src/test/resources/external-references.yaml, components/camel-openapi-java/src/test/resources/schemas/external-references-owner-remote.yaml, components/camel-openapi-java/src/test/resources/schemas/external-references-pet-remote.yaml
  • camel-openapi-rest-dsl-generator ← downstream of org.apache.camel:camel-core-model
  • camel-openapi-validator ← downstream of org.apache.camel:camel-rest-openapi
  • camel-openfeature ← downstream of org.apache.camel:camel-core-model
  • camel-openfga ← downstream of org.apache.camel:camel-core-model
  • camel-opensearch ← downstream of org.apache.camel:camel-core-model
  • camel-openstack ← downstream of org.apache.camel:camel-core-model
  • camel-opentelemetry ← downstream of org.apache.camel:camel-core-model
  • camel-opentelemetry-metrics ← downstream of org.apache.camel:camel-core-model
  • camel-opentelemetry2 ← downstream of org.apache.camel:camel-core-model
  • camel-optaplanner ← downstream of org.apache.camel:camel-core-model
  • camel-paho ← downstream of org.apache.camel:camel-core-model
  • camel-paho-mqtt5 ← downstream of org.apache.camel:camel-core-model
  • camel-parquet-avro ← downstream of org.apache.camel:camel-core-model
  • camel-pdf ← downstream of org.apache.camel:camel-core-model
  • camel-pg-replication-slot ← downstream of org.apache.camel:camel-core-model
  • camel-pgevent ← downstream of org.apache.camel:camel-core-model
  • camel-pgvector ← downstream of org.apache.camel:camel-core-model
  • camel-pinecone ← downstream of org.apache.camel:camel-core-model
  • camel-platform-http ← downstream of org.apache.camel:camel-core-model
  • camel-platform-http-jolokia ← downstream of org.apache.camel:camel-core-model
  • camel-platform-http-main ← downstream of org.apache.camel:camel-openapi-java
  • camel-platform-http-vertx ← downstream of org.apache.camel:camel-rest-openapi
  • camel-plc4x ← downstream of org.apache.camel:camel-core-model
  • camel-pqc ← downstream of org.apache.camel:camel-core-model
  • camel-printer ← downstream of org.apache.camel:camel-core-model
  • camel-protobuf ← downstream of org.apache.camel:camel-core-model
  • camel-pubnub ← downstream of org.apache.camel:camel-core-model
  • camel-pulsar ← downstream of org.apache.camel:camel-core-model
  • camel-python ← downstream of org.apache.camel:camel-core-model
  • camel-python3 ← downstream of org.apache.camel:camel-core-model
  • camel-qdrant ← downstream of org.apache.camel:camel-core-model
  • camel-quartz ← downstream of org.apache.camel:camel-core-model
  • camel-quickfix ← downstream of org.apache.camel:camel-core-model
  • camel-quickjs ← downstream of org.apache.camel:camel-core-model
  • camel-reactive-streams ← downstream of org.apache.camel:camel-core-model
  • camel-reactor ← downstream of org.apache.camel:camel-core-model
  • camel-redis ← downstream of org.apache.camel:camel-core-model
  • camel-ref ← downstream of org.apache.camel:camel-core-model
  • camel-resilience4j ← downstream of org.apache.camel:camel-core-model
  • camel-resilience4j-micrometer ← downstream of org.apache.camel:camel-core-model
  • camel-resourceresolver-github ← downstream of org.apache.camel:camel-core-model
  • camel-rest ← downstream of org.apache.camel:camel-core-model
  • camel-rest-openapi ← components/camel-rest-openapi/src/generated/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentConfigurer.java, components/camel-rest-openapi/src/generated/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointConfigurer.java, components/camel-rest-openapi/src/generated/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointUriFactory.java, components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json, components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc, components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/OpenApiExternalReferences.java, components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java, components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java, components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiExternalReferencesTest.java, components/camel-rest-openapi/src/test/resources/external-references-nested.yaml, components/camel-rest-openapi/src/test/resources/external-references-pet-remote.yaml, components/camel-rest-openapi/src/test/resources/external-references-pet.yaml, components/camel-rest-openapi/src/test/resources/external-references-root.yaml, components/camel-rest-openapi/src/test/resources/external-references-subdir-remote.yaml, components/camel-rest-openapi/src/test/resources/external-references-subdir.yaml, components/camel-rest-openapi/src/test/resources/schemas/external-references-owner-remote.yaml, components/camel-rest-openapi/src/test/resources/schemas/external-references-owner.yaml, components/camel-rest-openapi/src/test/resources/schemas/external-references-pet-remote.yaml, components/camel-rest-openapi/src/test/resources/schemas/external-references-pet.yaml
  • camel-rest-postman ← downstream of org.apache.camel:camel-core-model
  • camel-restdsl-openapi-plugin ← downstream of org.apache.camel:camel-openapi-java
  • camel-robotframework ← downstream of org.apache.camel:camel-core-model
  • camel-rocketmq ← downstream of org.apache.camel:camel-core-model
  • camel-rss ← downstream of org.apache.camel:camel-core-model
  • camel-rxjava ← downstream of org.apache.camel:camel-core-model
  • camel-saga ← downstream of org.apache.camel:camel-core-model
  • camel-salesforce ← downstream of org.apache.camel:camel-core-model
  • camel-salesforce-codegen ← downstream of org.apache.camel:camel-core-model
  • camel-salesforce-maven-plugin ← downstream of org.apache.camel:camel-core-model
  • camel-salesforce-parent ← downstream of org.apache.camel:camel-core-model
  • camel-sap-netweaver ← downstream of org.apache.camel:camel-core-model
  • camel-saxon ← downstream of org.apache.camel:camel-core-model
  • camel-scheduler ← downstream of org.apache.camel:camel-core-model
  • camel-schematron ← downstream of org.apache.camel:camel-core-model
  • camel-seda ← downstream of org.apache.camel:camel-core-model
  • camel-semantic ← downstream of org.apache.camel:camel-core-model
  • camel-semantic-openai ← downstream of org.apache.camel:camel-core-model
  • camel-semantic-typesafe-ai ← downstream of org.apache.camel:camel-core-model
  • camel-semantic-wolf-defender ← downstream of org.apache.camel:camel-core-model
  • camel-servicenow ← downstream of org.apache.camel:camel-core-model
  • camel-servicenow-maven-plugin ← downstream of org.apache.camel:camel-core-model
  • camel-servicenow-parent ← downstream of org.apache.camel:camel-core-model
  • camel-servlet ← downstream of org.apache.camel:camel-openapi-java
  • camel-shell ← downstream of org.apache.camel:camel-core-model
  • camel-shiro ← downstream of org.apache.camel:camel-core-model
  • camel-sjms ← downstream of org.apache.camel:camel-core-model
  • camel-sjms2 ← downstream of org.apache.camel:camel-core-model
  • camel-slack ← downstream of org.apache.camel:camel-core-model
  • camel-smb ← downstream of org.apache.camel:camel-core-model
  • camel-smooks ← downstream of org.apache.camel:camel-core-model
  • camel-smpp ← downstream of org.apache.camel:camel-core-model
  • camel-snakeyaml ← downstream of org.apache.camel:camel-core-model
  • camel-snmp ← downstream of org.apache.camel:camel-core-model
  • camel-soap ← downstream of org.apache.camel:camel-core-model
  • camel-solr ← downstream of org.apache.camel:camel-core-model
  • camel-spiffe ← downstream of org.apache.camel:camel-core-model
  • camel-splunk-hec ← downstream of org.apache.camel:camel-core-model
  • camel-spring ← downstream of org.apache.camel:camel-core-model
  • camel-spring-ai-chat ← downstream of org.apache.camel:camel-core-model
  • camel-spring-ai-embeddings ← downstream of org.apache.camel:camel-core-model
  • camel-spring-ai-image ← downstream of org.apache.camel:camel-core-model
  • camel-spring-ai-parent ← downstream of org.apache.camel:camel-core-model
  • camel-spring-ai-vector-store ← downstream of org.apache.camel:camel-core-model
  • camel-spring-batch ← downstream of org.apache.camel:camel-core-model
  • camel-spring-cloud-config ← downstream of org.apache.camel:camel-core-model
  • camel-spring-jdbc ← downstream of org.apache.camel:camel-core-model
  • camel-spring-ldap ← downstream of org.apache.camel:camel-core-model
  • camel-spring-main ← downstream of org.apache.camel:camel-core-model
  • camel-spring-parent ← downstream of org.apache.camel:camel-core-model
  • camel-spring-rabbitmq ← downstream of org.apache.camel:camel-core-model
  • camel-spring-redis ← downstream of org.apache.camel:camel-core-model
  • camel-spring-security ← downstream of org.apache.camel:camel-core-model
  • camel-spring-ws ← downstream of org.apache.camel:camel-core-model
  • camel-spring-xml ← downstream of org.apache.camel:camel-core-model
  • camel-sql ← downstream of org.apache.camel:camel-core-model
  • camel-ssh ← downstream of org.apache.camel:camel-core-model
  • camel-state-store ← downstream of org.apache.camel:camel-core-model
  • camel-state-store-parent ← downstream of org.apache.camel:camel-core-model
  • camel-stax ← downstream of org.apache.camel:camel-core-model
  • camel-stitch ← downstream of org.apache.camel:camel-core-model
  • camel-stream ← downstream of org.apache.camel:camel-core-model
  • camel-streamcaching-test ← downstream of org.apache.camel:camel-test-junit6
  • camel-stringtemplate ← downstream of org.apache.camel:camel-core-model
  • camel-stripe ← downstream of org.apache.camel:camel-core-model
  • camel-stub ← downstream of org.apache.camel:camel-core-model
  • camel-swift ← downstream of org.apache.camel:camel-core-model
  • camel-syslog ← downstream of org.apache.camel:camel-core-model
  • camel-tahu ← downstream of org.apache.camel:camel-core-model
  • camel-tarfile ← downstream of org.apache.camel:camel-core-model
  • camel-telegram ← downstream of org.apache.camel:camel-core-model
  • camel-telemetry ← downstream of org.apache.camel:camel-core-model
  • camel-telemetry-dev ← downstream of org.apache.camel:camel-core-model
  • camel-tensorflow-serving ← downstream of org.apache.camel:camel-core-model
  • camel-test-citrus ← downstream of org.apache.camel:camel-core-model
  • camel-test-dst ← downstream of org.apache.camel:camel-core-model
  • camel-test-infra-all ← downstream of org.apache.camel:camel-test-infra-artemis
  • camel-test-infra-artemis ← downstream of org.apache.camel:camel-test-junit6
  • camel-test-infra-core ← downstream of org.apache.camel:camel-core
  • camel-test-infra-smb ← downstream of org.apache.camel:camel-test-junit6
  • camel-test-junit5 ← downstream of org.apache.camel:camel-core-model
  • camel-test-junit6 ← downstream of org.apache.camel:camel-core-model
  • camel-test-main-junit5 ← downstream of org.apache.camel:camel-core-model
  • camel-test-main-junit6 ← downstream of org.apache.camel:camel-core-model
  • camel-test-parent ← downstream of org.apache.camel:camel-core-model
  • camel-test-spring-junit5 ← downstream of org.apache.camel:camel-core-model
  • camel-test-spring-junit6 ← downstream of org.apache.camel:camel-core-model
  • camel-thrift ← downstream of org.apache.camel:camel-core-model
  • camel-thymeleaf ← downstream of org.apache.camel:camel-core-model
  • camel-tika ← downstream of org.apache.camel:camel-core-model
  • camel-timer ← downstream of org.apache.camel:camel-core-model
  • camel-toon ← downstream of org.apache.camel:camel-core-model
  • camel-tracing ← downstream of org.apache.camel:camel-core-model
  • camel-twilio ← downstream of org.apache.camel:camel-core-model
  • camel-twitter ← downstream of org.apache.camel:camel-core-model
  • camel-typesafe-ai ← downstream of org.apache.camel:camel-core-model
  • camel-ubl ← downstream of org.apache.camel:camel-core-model
  • camel-undertow ← downstream of org.apache.camel:camel-openapi-java
  • camel-undertow-spring-security ← downstream of org.apache.camel:camel-core-model
  • camel-univocity-parsers ← downstream of org.apache.camel:camel-core-model
  • camel-validator ← downstream of org.apache.camel:camel-core-model
  • camel-velocity ← downstream of org.apache.camel:camel-core-model
  • camel-vertx ← downstream of org.apache.camel:camel-core-model
  • camel-vertx-common ← downstream of org.apache.camel:camel-core-model
  • camel-vertx-http ← downstream of org.apache.camel:camel-core-model
  • camel-vertx-parent ← downstream of org.apache.camel:camel-core-model
  • camel-vertx-websocket ← downstream of org.apache.camel:camel-core-model
  • camel-wal ← downstream of org.apache.camel:camel-core-model
  • camel-wasm ← downstream of org.apache.camel:camel-core-model
  • camel-weather ← downstream of org.apache.camel:camel-core-model
  • camel-weaviate ← downstream of org.apache.camel:camel-core-model
  • camel-web3j ← downstream of org.apache.camel:camel-core-model
  • camel-webhook ← downstream of org.apache.camel:camel-core-model
  • camel-whatsapp ← downstream of org.apache.camel:camel-core-model
  • camel-wordpress ← downstream of org.apache.camel:camel-core-model
  • camel-workday ← downstream of org.apache.camel:camel-core-model
  • camel-xchange ← downstream of org.apache.camel:camel-core-model
  • camel-xj ← downstream of org.apache.camel:camel-core-model
  • camel-xml-io ← core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java, core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
  • camel-xml-io-dsl ← downstream of org.apache.camel:camel-xml-io
  • camel-xml-jaxb ← downstream of org.apache.camel:camel-core-model
  • camel-xml-jaxb-dsl ← downstream of org.apache.camel:camel-core-languages
  • camel-xml-jaxb-dsl-test-definition ← downstream of org.apache.camel:camel-core-model
  • camel-xml-jaxb-dsl-test-spring ← downstream of org.apache.camel:camel-core-languages
  • camel-xml-jaxp ← downstream of org.apache.camel:camel-core-model
  • camel-xmlsecurity ← downstream of org.apache.camel:camel-core-model
  • camel-xmpp ← downstream of org.apache.camel:camel-core-model
  • camel-xpath ← downstream of org.apache.camel:camel-core-model
  • camel-xslt ← downstream of org.apache.camel:camel-core-model
  • camel-xslt-saxon ← downstream of org.apache.camel:camel-core-model
  • camel-yaml-dsl-common ← downstream of org.apache.camel:camel-core-engine
  • camel-yaml-dsl-validator ← downstream of org.apache.camel:camel-catalog
  • camel-yaml-dsl-validator-maven-plugin ← downstream of org.apache.camel:camel-yaml-dsl-validator
  • camel-yaml-io ← core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java
  • camel-zendesk ← downstream of org.apache.camel:camel-core-model
  • camel-zip-deflater ← downstream of org.apache.camel:camel-core-model
  • camel-zipfile ← downstream of org.apache.camel:camel-core-model
  • camel-zookeeper ← downstream of org.apache.camel:camel-core-model
  • camel-zookeeper-master ← downstream of org.apache.camel:camel-core-model
  • components ← downstream of org.apache.camel:camel-core-model
Modules with tests skipped (20)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl-maven-plugin
  • coverage
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 2 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
Build reactor — dependencies compiled but only changed modules were tested (13 modules, 4m 40s total)

Total reactor time: 4m 40s

Module Duration Status
Camel :: OpenApi Java 58.5s SUCCESS
Camel :: Component DSL 53.1s SUCCESS
Camel :: Java DSL IO 31.8s SUCCESS
Camel :: Catalog :: Camel Catalog 26.5s SUCCESS
Camel :: YAML DSL 22.4s SUCCESS
Camel :: REST OpenApi 22.1s SUCCESS
Camel :: Core Model 18.3s SUCCESS
Camel :: Docs 16.8s SUCCESS
Camel :: XML IO 14.5s SUCCESS
Camel :: YAML IO 8.2s SUCCESS
Camel :: YAML DSL :: Deserializers 8.0s SUCCESS
Camel :: Endpoint DSL n/a
Camel :: JBang :: Core n/a

Top 20 slowest modules:

  • Camel :: OpenApi Java (58.5s)
  • Camel :: Component DSL (53.1s)
  • Camel :: Java DSL IO (31.8s)
  • Camel :: Catalog :: Camel Catalog (26.5s)
  • Camel :: YAML DSL (22.4s)
  • Camel :: REST OpenApi (22.1s)
  • Camel :: Core Model (18.3s)
  • Camel :: Docs (16.8s)
  • Camel :: XML IO (14.5s)
  • Camel :: YAML IO (8.2s)
  • Camel :: YAML DSL :: Deserializers (8.0s)

⚙️ View full build and test results

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of 152edec..f48bfa0. Thanks Andrea.

The only new commit is "Regen", so most of my earlier review still stands.

Fixed:

  • Earlier point 2 (catalog not regenerated): the catalog copy of camelYamlDsl-model.json now matches the one in dsl/camel-yaml-dsl, and CI is green. Luigi's thread on that file can be resolved.

Still open:

  1. blocking: nested references (my thread on line 125; Luigi and gnodet-bot raised the same thing on lines 121-125, in both copies). This has not changed. readLocalDocument still resolves every nested ref against new File("."), and returns null when it cannot read a document. A $ref inside schemas/pet.yaml is therefore not read from where the parser reads it, and an http ref in that document gets through under local. file: refs fail the same way, because they are read as RefFormat.RELATIVE. A file: ref is fine under local, but its own refs are never checked. Resolving each ref against the document that contains it, reading with the ref's own format (RefUtils.computeRefFormat) and throwing when a document cannot be read would cover all of these.
  2. blocking: OpenAPI 3.1 $id (my thread on line 156, Luigi's on line 184). Not changed.
  3. blocking (raised by Luigi, which I missed): YAML aliases. I checked this against the libraries. Yaml.mapper().readTree (jackson-dataformat-yaml) returns an alias *x as the plain string x. swagger-parser reads YAML with SnakeYAML Yaml.load (DeserializationUtils.readYamlTree), which expands the alias. So a $ref given as an alias of an http URL passes the check, under local and, with an anchor name starting with #, under none too. If readTree used DeserializationUtils.deserializeIntoTree(content, location), the checker would scan the same tree the parser resolves, with aliases expanded and the parser's alias limits applied.
  4. not blocking: the deprecated RefUtils.readExternalRef(String, RefFormat, List, Path) is still used. The 5-arg overload with a null PermittedUrlsChecker does the same thing.
  5. not blocking: the checked set and the document name used for nested refs (inline comment).

Tests: points 1-3 each need a regression test that expects the start (or api-doc) to fail with no http request made, in both camel-rest-openapi and camel-openapi-java. Luigi asked for the same. For example, use a referenced document in a subdirectory, a 3.1 schema with $id, and a $ref that is an alias.

All points apply to both copies of OpenApiExternalReferences.

Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

…ay the parser resolves them

The checker now scans the tree the parser builds (YAML aliases expanded), resolves each reference
against the document that contains it and, for OpenAPI 3.1, against the enclosing $id, reads file:
and classpath: documents as the parser does, and fails when a referenced document cannot be read.
Regression tests for nested documents, $id, aliases and file: references in both modules.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on my earlier review — all five issues raised on 2026-10-20 are addressed in commit 47ac40a. The rewrite is solid: YAML aliases are now expanded before the policy check via DeserializationUtils.deserializeIntoTree(), each reference is resolved against its containing document using ExternalRefProcessor.join() (OpenAPI 3.0) and ReferenceUtils.resolve() with the $id chain (OpenAPI 3.1), unreadable documents fail closed with a diagnostic message, and the tests cover all the key edge cases including aliases, subdirectory resolution, $id redirection, file: URIs, and remote specifications.

One small metadata inconsistency remains (see inline).

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of f48bfa0..47ac40a. Thanks Andrea, this is a careful rewrite.

Fixed from my earlier reviews:

  1. Nested references: each $ref is now resolved against the document that contains it (ExternalRefProcessor.join for 3.0, ReferenceUtils.resolve for 3.1), read the way the parser reads it (file:/classpath: by path, otherwise the 5-arg RefUtils.readExternalRef), and a document that cannot be read now fails the check instead of being skipped. localChecksTheReferencesOfADocumentInASubdirectory, localChecksADocumentReferencedByAbsolutePath and localFailsWhenAReferencedDocumentCannotBeRead cover this.
  2. OpenAPI 3.1 $id: the scan carries the $id chain as OpenAPI31Traverser.traverseSchema does, and the policy is applied to the resolved target. localRejectsAnOpenApi31ReferenceResolvedAgainstAnHttpId (zero requests) plus the all control cover this.
  3. YAML aliases: the checker now scans DeserializationUtils.deserializeIntoTree, the same tree the parser resolves, so *#remote under none and an ordinary alias under local are both rejected with zero requests.
  4. The deprecated 4-arg RefUtils.readExternalRef is gone.
  5. checked and the document name now hold the resolved location.

The regression tests for points 1-3 are in both camel-rest-openapi and camel-openapi-java, and both copies of OpenApiExternalReferences are identical apart from the package and the class comment. Reading a remote specification once and handing it to readContents(content, null, options, location) keeps the default path unchanged, which is a nice touch.

Luigi's and gnodet-bot's threads about the same points look addressed too (gnodet-bot confirmed in its follow-up). Luigi, could you check yours and resolve them if you agree?

Still open, not blocking: gnodet-bot's point on OpenApiDefinition (line 67). The externalReferences attribute has no label = "security", while the endpoint and component option do, so the catalog shows it under common for the REST DSL. Adding the label (and regenerating) would keep the grouping consistent.

Conventions check: the commit, branch and JIRA linkage follow the project guidelines, and the generated files and catalog are in sync (CI is green on Java 21 and 25). No upgrade-guide entry is needed, since the default all keeps today's behaviour. The tests use AssertJ in camel-rest-openapi and JUnit in camel-openapi-java, which matches each module. Neither uses Thread.sleep.

Before approving, I'd like to go over a couple of remaining cases with Andrea directly.

This review covers project rules and conventions only. It does not replace CodeRabbit, Sourcery or SonarCloud.

Claude Code on behalf of Claus Ibsen

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

…f openApi as security, like the endpoint and component options

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd
oscerd requested a review from davsclaus October 21, 2026 11:06

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on my earlier review — the remaining open issue (missing label = "security" on externalReferences in OpenApiDefinition) is addressed in commit 8e60618.

The @Metadata annotation now carries label = "security", consistent with the component and endpoint declarations. The catalog regeneration in the same commit (openApi.json, camelYamlDsl-model.json) puts the attribute in the security group, matching the generated configurer classes for the component and endpoint. The open review thread is resolved by this commit.

All prior security findings — YAML alias expansion, nested-reference resolution against the containing document, OpenAPI 3.1 $id chain propagation, fail-closed behaviour on unreadable documents — are addressed and confirmed by davsclaus's re-review. LGTM on the security model.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of 47ac40a..8e60618. Thanks Andrea.

The new commit adds label = "security" to externalReferences on OpenApiDefinition, and the generated files are in sync: the core-model and catalog openApi.json, and both copies of camelYamlDsl-model.json. None of the other generated artefacts (XSDs, camelYamlDsl.json, ModelDeserializers) carry labels, so nothing else needs regenerating. The REST DSL attribute now sits in the security group, like the endpoint and component options.

As I said in my last review, I'd like to go over a couple of remaining cases with you directly before approving.

This review was generated by an AI agent (Claude Code on behalf of davsclaus) and may contain inaccuracies. Please verify all suggestions before applying.

@luigidemasi luigidemasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes on 8e60618a6883f0b0657346c36278b692bcf1a8c7: one reference-policy issue remains.

The earlier YAML-alias, ordinary nested-reference, unreadable-document and file: cases now reject prohibited references in both loading paths, and the generated catalog mirrors are synchronized. The latest commit correctly adds the REST DSL security label. The direct OpenAPI 3.1 $id case is fixed, but its inherited base is still lost when the checker follows an external schema; the inline comment describes the remaining reproduction.

Validation:

  • At 47ac40a0, both complete module suites passed: 211 camel-rest-openapi tests and 105 camel-openapi-java tests, with no failures, errors or skips.
  • Verified that both component trees and their dependency configuration are unchanged at 8e60618a; only the model label and generated metadata changed. The full module suites were not rerun for that metadata-only commit.
  • Reran the additional inherited-$id regression against the unchanged runtime code. Both endpoint loading and api-doc generation accepted the contract under externalReferences=local and made one prohibited HTTP request; both regression cases failed their zero-request/rejection assertions.
  • Hosted Java 21/25 builds and documentation validation are still queued. License check, dependency review and PR-id upload passed; Sonar was skipped.

AI-generated review by Codex on behalf of Luigi De Masi (@luigidemasi).

… across a reference edge

The parser keeps the $ids of the schemas enclosing a reference when it follows that reference to
another document, so an absolute $id decides what the relative references inside that document
resolve to. The check now carries those $ids into the referenced document, folds its base from them
the way the parser does, and keys the visited documents by location and inherited $ids.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous findings are all addressed. LGTM.

The new commit correctly implements inherited $id propagation across reference edges: the Target class carries inheritedIds into each referenced document, document() folds them into the effective base the same way OpenAPI31Traverser.traverseSchema does, and scan() accumulates $id entries with defensive copies so sibling branches don't share state. The checked set is keyed by location + " under " + inheritedIds, which prevents both duplicate work and incorrect cache hits from the same file reached under different inherited bases. Both checker copies (camel-rest-openapi and camel-openapi-java) are in sync. The test coverage — WireMock assertions of zero HTTP requests, the classpath bridge case in camel-openapi-java, and the all-mode regression — covers the exact scenarios described in the PR body and in luigidemasi's reproduction.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of 8e60618..2b81d2f. Thanks Andrea.

The new commit carries the $ids of the schemas enclosing a reference into the document it leads to, builds that document's base from them the way OpenAPI31Traverser.traverseSchema / ReferenceVisitor.resolveSchemaRef do, and keys the visited documents by location plus inherited $ids. Both copies of OpenApiExternalReferences are still identical apart from the package and the class comment. The tests cover it in both modules: localKeepsTheInheritedIdAcrossAnExternalReference with zero requests and the all control in camel-rest-openapi, and keepsTheInheritedIdAcrossAnExternalReference with a classpath bridge in camel-openapi-java.

As in my last reviews, there are still a couple of cases I'd like to go over with you directly before approving.

This review was generated by an AI agent (Claude Code on behalf of davsclaus) and may contain inaccuracies. Please verify all suggestions before applying.

@luigidemasi luigidemasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes on 2b81d2f59eee65f5948cd5b6108472b93b73f80f.

The inherited-$id bypass from my previous review is fixed: both loading paths now reject that reproduction without making an HTTP request. However, the new visited key introduces unbounded traversal for recursive local schemas. Please change cycle detection in both copies of OpenApiExternalReferences and add regression coverage before merging; the inline comment gives the reproduction and required behavior.

Validation at this head:

  • Both complete module suites passed: 213 camel-rest-openapi tests and 106 camel-openapi-java tests, with no failures, errors or skips.
  • A separate recursive-schema probe threw OutOfMemoryError in both endpoint loading and api-doc generation under externalReferences=local, using a JVM limited to 256 MB. The identical contract succeeds under all and with the previous checker under local.
  • All 34 focused reference-policy tests passed. Inverting the new OpenAPI 3.1 inheritance guard in an isolated copy caused six test failures; the source was restored afterward. The passing suite does not cover the recursive-schema regression.
  • Hosted Java 21/25 builds, documentation validation, license check, dependency review and PR-id upload have passed. Sonar was skipped.

AI-generated review by Codex on behalf of Luigi De Masi (@luigidemasi).

}

String key() {
return inheritedIds.isEmpty() ? location : location + " under " + inheritedIds;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Stop revisiting equivalent recursive schemas

Please replace this history-based visited key with cycle detection that terminates for equivalent resolution states while still distinguishing genuinely different inherited bases. Appending the complete inheritedIds list means that revisiting a schema with its own $id produces a new key every time: [id], [id, id], [id, id, id], etc. checked.add(target.key()) never stops the recursion, even though the effective base is unchanged.

For example, let an OpenAPI 3.1 response schema reference file:///tmp/example/node.yaml, containing:

$id: file:///tmp/example/node.yaml
type: object
properties:
  next:
    $ref: file:///tmp/example/node.yaml

Both RestOpenApiEndpoint.loadSpecificationFrom and RestOpenApiReader.read exhaust a 256 MB heap under externalReferences=local, with the failure reaching Target.key(). The same contract succeeds under all, and under local with the previous checker. This is a regression for a valid recursive local schema.

Apply the code change to both helper copies. Add tests in both modules proving that recursive local schemas finish successfully, and retain coverage ensuring that revisiting the same document under a different inherited base cannot hide a prohibited HTTP reference. The current acyclic inherited-ID tests do not exercise this failure.

AI-generated review by Codex on behalf of Luigi De Masi (@luigidemasi).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants