Claus Ibsen created CAMEL-25747:
-----------------------------------

             Summary: camel-rest-openapi - log the problems the OpenAPI parser 
finds in the specification
                 Key: CAMEL-25747
                 URL: https://issues.apache.org/jira/browse/CAMEL-25747
             Project: Camel
          Issue Type: Improvement
          Components: camel-rest-openapi
            Reporter: Claus Ibsen
             Fix For: 4.24.0


camel-rest-openapi loads the specification with the swagger parser, but it 
drops the messages in the parse result. The parser ignores the parts it cannot 
read, so a mistake in the contract leaves no trace in the log.

Example: a path nested inside another path item.

{code}
"paths": {
  "/stock": {
    "get": { "operationId": "listStock", ... },
    "/stock/{sku}": {
      "get": { "operationId": "getStock", ... }
    }
  }
}
{code}

The parser reports "attribute paths.'/stock'./stock/\{sku\} is unexpected" and 
ignores the nested path. The contract-first Rest DSL starts, but GET /stock/A1 
answers 404, and nothing in the log says why. A local model wrote this contract 
in the overnight benchmark of Oct 17-18 2026 (see CAMEL-25746).

Proposal:
* Log the parser messages as a WARN when the specification is loaded. This 
covers the consumer (the contract-first Rest DSL) and the producer.
* When the parser cannot read the specification at all, add its messages to the 
exception. Today it says only "Could not deserialize OpenAPI specification 
from: ...".

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to