k-krawczyk opened a new pull request, #26392:
URL: https://github.com/apache/camel/pull/26392
First batch of CAMEL-24710: the data format pages. 31 of their 100 YAML
route examples did not pass the YAML validator (schema plus the catalog checks
of endpoints and Simple). After this change 2 still fail, both on the
xmlSecurity page (see below), and `EipDocExamplesTest` validates the data
format pages from now on.
### What was wrong
| Shape | Pages | Fix |
|---|---|---|
| `steps:` written next to `from:` in a `- route:` (18 blocks) | csv, dfdl,
ocsf, pqc, smooks, tarFile, toon, ubl, zipFile | moved under `from:`; the
runtime rejects it too (`RouteDefinitionDeserializer` throws
`UnsupportedFieldException` for `steps`) |
| `ref:` on `marshal`/`unmarshal` | base64, cbor, jacksonXml2, jacksonXml3,
swiftMt, swiftMx | `custom: {ref: ...}`, as snakeYaml already does; the XML
tabs of base64, swiftMt and swiftMx had `<marshal ref="..."/>` and now use
`<custom ref="..."/>` |
| option names | avro, soap, xmlSecurity | `instanceClassName`,
`elementNameStrategy` (plus `contextPath`, spelled `contentPath` in the soap
XML tab), `keyOrTrustStoreParameters`; same fix in the XML tabs |
| `jackson: {}` | jackson3 | `json` with `library: Jackson` in all three
tabs. There is no `jackson()` in the Java DSL and no `<jackson>` in XML;
camel-jackson3 registers the data format name `jackson`, as camel-jackson does |
| `jms:payment:response` read as destination type `payment` | iso8583 |
`jms:queue:payment:response`, which the runtime resolves to the same queue |
| block scalar text indented less than its key, YAML does not parse | ocsf |
indented under `expression: \|` |
| options deleted in Camel 2.15 | csv | the
`autogenColumns`/`CSVConfig`/`CSVStrategy` and `skipFirstLine` sections are
removed (one of them also opened a top-level `== DSL` section in the middle of
the page); the `skipHeaderRecord` section stays |
### xmlSecurity is skipped by the test
Its two failing examples are right for the runtime: they write the cipher
algorithms as URIs (`http://www.w3.org/2001/04/xmlenc#aes128-cbc`), which is
what `XMLSecurityDataFormat` hands to `XMLCipher.getInstance`, and what the
Spring XML tests of camel-xmlsecurity use. The model's enums list the
`XMLCipher` constant names instead (`AES_128`, `RSA_v1dot5`, default
`AES-256-GCM`), and `XMLCipher.getInstance("AES_128")` throws
`XMLEncryptionException: Null or empty transformation` (checked with xmlsec
4.0.4). Rewriting the examples to match the schema would break them at runtime,
so the page is in a skip set with the reason, until the model is fixed in a
separate ticket.
### Test
`EipDocExamplesTest` gets
`everyYamlExampleOfTheDataFormatDocumentationValidates`, sharing the extraction
with the EIP test. It is schema-only like the EIP test, so it would not have
caught the iso8583 endpoint, which only the catalog checks in camel-jbang see.
### Verification
- The test fails against the catalog docs before this change, listing the
failing examples, and passes after it. All 91 tests of camel-yaml-dsl-validator
pass; `-Psourcecheck` is clean.
- The 98 data format examples also went through `CamelYamlParser` (the YAML
DSL loader with stubbed components): only the two xmlSecurity examples fail to
load, on the old `keyOrTrustStoreParametersRef`, now fixed.
- The catalog copies are identical to the component docs; rebuilding csv,
base64, jackson3, xmlsecurity and ocsf leaves no generated changes.
### Not in this PR
- bindy and crypto have `<marshal ref="..."/>` in XML examples that have no
failing YAML next to them.
- The component pages (270 failing) and the component sub-pages (74) come in
the next PRs; 188 of the component failures are the `steps:` next to `from:`
shape. The jsonpath language page needs the validator to skip languages it
cannot load.
_Reported by Claude Code on behalf of Karol Krawczyk_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]