You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/10/18 07:09:11 UTC

[PR] CAMEL-25747: camel-rest-openapi - log the problems the OpenAPI parser finds in the specification [camel]

davsclaus opened a new pull request, #28043:
URL: https://github.com/apache/camel/pull/28043

   CAMEL-25747: camel-rest-openapi loaded the specification with the swagger parser but dropped the messages in the parse result. The parser ignores the parts it cannot read, so a mistake in the contract left no trace in the log.
   
   In the overnight benchmark of Oct 17-18 (see CAMEL-25746), a local model nested `"/stock/{sku}"` inside the `"/stock"` path item. The parser reports `attribute paths.'/stock'./stock/{sku} is unexpected` and ignores the nested path. The contract-first Rest DSL started, but `GET /stock/A1` answered 404, and the log said nothing.
   
   ## What
   
   - **A WARN with the parser messages** when the specification is loaded. `loadSpecificationFrom` serves both the consumer (the contract-first Rest DSL) and the producer:
     `The OpenAPI specification nested-path.json has problems, and the parser ignores the parts it cannot read: attribute paths.'/stock'./stock/{sku} is unexpected`
   - **The exception includes the messages** when the parser cannot read the specification at all. A Swagger 2.0 document now gives `Could not deserialize OpenAPI specification from: openapi.json (attribute openapi is missing)`. Before, it said only the first part.
   
   ## Tests
   
   - `RestOpenApiSpecificationProblemsTest` (new): the nested path is logged as a WARN, a valid specification logs nothing, and the exception for a Swagger 2.0 document names the missing attribute.
   - All camel-rest-openapi tests pass (186).
   - Two existing test specifications now log the WARN, and both have real mistakes: `fruits-3.0.yaml` has an array parameter without `items`, and `missing-opid.yaml` has Swagger 2.0 style parameters (`type` and `format` without a `schema`). The tests do not depend on these parts, so I left the files as they are.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25747: camel-rest-openapi - log the problems the OpenAPI parser finds in the specification [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28043:
URL: https://github.com/apache/camel/pull/28043#issuecomment-6247184689

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `components/camel-rest-openapi`
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 20 of 706 tested, 27 compile-only — current: 20 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **20 affected modules** (current approach: 20).
   
   **Skip-tests mode would test 20 modules** (1 direct + 19 downstream), **skip tests for 27** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (20)</summary>
   
   - `camel-a2a` ← downstream of org.apache.camel:camel-platform-http-vertx
   - `camel-jbang-mcp` ← downstream of org.apache.camel:camel-rest-openapi
   - `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-jsonpath` ← downstream of org.apache.camel:camel-platform-http-vertx
   - `camel-knative-http` ← downstream of org.apache.camel:camel-platform-http-vertx
   - `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
   - `camel-mcp-server` ← downstream of org.apache.camel:camel-platform-http-vertx
   - `camel-micrometer-prometheus` ← downstream of org.apache.camel:camel-platform-http-main
   - `camel-oauth` ← downstream of org.apache.camel:camel-platform-http-main
   - `camel-observability-services` ← downstream of org.apache.camel:camel-micrometer-prometheus
   - `camel-openai` ← downstream of org.apache.camel:camel-platform-http-vertx
   - `camel-openapi-validator` ← downstream of org.apache.camel:camel-rest-openapi
   - `camel-platform-http-main` ← downstream of org.apache.camel:camel-platform-http-vertx
   - `camel-platform-http-vertx` ← downstream of org.apache.camel:camel-rest-openapi
   - `camel-rest-openapi` ← 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/RestOpenApiSpecificationProblemsTest.java, components/camel-rest-openapi/src/test/resources/nested-path.json
   - `camel-semantic-openai` ← downstream of org.apache.camel:camel-openai
   - `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
   
   </details>
   
   <details><summary>Modules with tests skipped (27)</summary>
   
   - `apache-camel`
   - `camel-allcomponents`
   - `camel-catalog`
   - `camel-catalog-console`
   - `camel-catalog-maven`
   - `camel-catalog-suggest`
   - `camel-componentdsl`
   - `camel-endpointdsl`
   - `camel-endpointdsl-support`
   - `camel-itest`
   - `camel-jbang-core`
   - `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`
   - `camel-yaml-dsl-deserializers`
   - `camel-yaml-dsl-maven-plugin`
   - `coverage`
   - `docs`
   - `dummy-component`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   <details><summary>All tested modules (47 modules, 9m 37s total)</summary>
   
   **Total reactor time:** 9m 37s
   
   | Module | Duration | Status |
   | --- | --- | --- |
   | Camel :: AI :: MCP Server | 53.8s | SUCCESS |
   | Camel :: AI :: OpenAI | 49.0s | SUCCESS |
   | Camel :: Launcher | 47.0s | SUCCESS |
   | Camel :: JBang :: MCP | 41.5s | SUCCESS |
   | Camel :: OAuth | 33.2s | SUCCESS |
   | Camel :: Knative HTTP | 30.2s | SUCCESS |
   | Camel :: JBang :: Plugin :: Validate | 27.8s | SUCCESS |
   | Camel :: REST OpenApi | 26.1s | SUCCESS |
   | Camel :: Platform HTTP :: Vert.x | 22.5s | SUCCESS |
   | Camel :: Catalog :: Camel Catalog | 21.5s | SUCCESS |
   | Camel :: AI :: A2A | 20.7s | SUCCESS |
   | Camel :: Component DSL | 19.8s | SUCCESS |
   | Camel :: YAML DSL :: Validator | 19.3s | SUCCESS |
   | Camel :: YAML DSL | 18.2s | SUCCESS |
   | Camel :: JBang :: Plugin :: Kubernetes | 14.6s | SUCCESS |
   | Camel :: JBang :: Plugin :: Testing | 14.5s | SUCCESS |
   | Camel :: Platform HTTP :: Main | 13.0s | SUCCESS |
   | Camel :: Kamelet Main | 12.1s | SUCCESS |
   | Camel :: JSon Path | 11.9s | SUCCESS |
   | Camel :: Docs | 11.4s | SUCCESS |
   | Camel :: OpenAPI :: Validator | 9.5s | SUCCESS |
   | Camel :: YAML DSL :: Validator Maven Plugin | 7.6s | SUCCESS |
   | Camel :: Catalog :: Camel Route Parser | 6.7s | SUCCESS |
   | Camel :: Catalog :: Camel Report Maven Plugin | 6.5s | SUCCESS |
   | Camel :: YAML DSL :: Deserializers | 6.5s | SUCCESS |
   | Camel :: AI :: Semantic OpenAI | 5.5s | SUCCESS |
   | Camel :: Assembly | 5.0s | SUCCESS |
   | Camel :: All Components Sync point | 4.4s | SUCCESS |
   | Camel :: Catalog :: Maven | 2.6s | SUCCESS |
   | Camel :: Micrometer :: Prometheus | 2.1s | SUCCESS |
   | Camel :: YAML DSL :: Maven Plugins | 2.1s | SUCCESS |
   | Camel :: Catalog :: Suggest (deprecated) | 1.9s | SUCCESS |
   | Camel :: JBang :: Plugin :: Edit | 1.4s | SUCCESS |
   | Camel :: Coverage | 1.1s | SUCCESS |
   | Camel :: JBang :: Plugin :: Generate | 1.0s | SUCCESS |
   | Camel :: JBang :: Main | 0.8s | SUCCESS |
   | Camel :: JBang :: Integration tests | 0.8s | SUCCESS |
   | Camel :: JBang :: Plugin :: MCP | 0.7s | SUCCESS |
   | Camel :: Endpoint DSL :: Support | 0.7s | SUCCESS |
   | Camel :: Catalog :: Console | 0.6s | SUCCESS |
   | Camel :: Launcher :: Container | 0.6s | SUCCESS |
   | Camel :: Catalog :: Dummy Component | 0.5s | SUCCESS |
   | Camel :: Observability Services | 0.5s | SUCCESS |
   | Camel :: Endpoint DSL | n/a |  |
   | Camel :: Integration Tests | n/a |  |
   | Camel :: JBang :: Core | n/a |  |
   | Camel :: JBang :: Plugin :: TUI | n/a |  |
   
   **Top 20 slowest modules:**
   - `Camel :: AI :: MCP Server` (53.8s)
   - `Camel :: AI :: OpenAI` (49.0s)
   - `Camel :: Launcher` (47.0s)
   - `Camel :: JBang :: MCP` (41.5s)
   - `Camel :: OAuth` (33.2s)
   - `Camel :: Knative HTTP` (30.2s)
   - `Camel :: JBang :: Plugin :: Validate` (27.8s)
   - `Camel :: REST OpenApi` (26.1s)
   - `Camel :: Platform HTTP :: Vert.x` (22.5s)
   - `Camel :: Catalog :: Camel Catalog` (21.5s)
   - `Camel :: AI :: A2A` (20.7s)
   - `Camel :: Component DSL` (19.8s)
   - `Camel :: YAML DSL :: Validator` (19.3s)
   - `Camel :: YAML DSL` (18.2s)
   - `Camel :: JBang :: Plugin :: Kubernetes` (14.6s)
   - `Camel :: JBang :: Plugin :: Testing` (14.5s)
   - `Camel :: Platform HTTP :: Main` (13.0s)
   - `Camel :: Kamelet Main` (12.1s)
   - `Camel :: JSon Path` (11.9s)
   - `Camel :: Docs` (11.4s)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/39106595883)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25747: camel-rest-openapi - log the problems the OpenAPI parser finds in the specification [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #28043:
URL: https://github.com/apache/camel/pull/28043


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25747: camel-rest-openapi - log the problems the OpenAPI parser finds in the specification [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #28043:
URL: https://github.com/apache/camel/pull/28043#issuecomment-6247276117

   No backport: this is an improvement, and it goes into 4.24.0 only.
   
   _Claude Code on behalf of davsclaus_


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-25747: camel-rest-openapi - log the problems the OpenAPI parser finds in the specification [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28043:
URL: https://github.com/apache/camel/pull/28043#issuecomment-6246983269

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: 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](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org