Claus Ibsen created CAMEL-24888:
-----------------------------------
Summary: camel-yaml-dsl-validator, camel-jbang - say the shape for
the seven mistakes of the HTTP rungs (constant null, setExchangeProperty,
unclosed quote, toD options, library case, jsonPath key, rest-openapi path
parameter)
Key: CAMEL-24888
URL: https://issues.apache.org/jira/browse/CAMEL-24888
Project: Camel
Issue Type: Improvement
Components: camel-yaml-dsl, camel-jbang
Reporter: Claus Ibsen
Fix For: 4.23.0
>From the camel-jbang-mcp stepwise benchmark on the HTTP rungs (CAMEL-24886,
>series s5, three runs of four examples): 22 of 32 steps failed, and the
>refused writes cluster on seven shapes the validator does not name a fix for.
>Each is one hint row; the count is how often the local model wrote it.
# {{constant: null}} (6x) to clear the body before a GET: "constant: null
found, string expected". Say: to set an empty body write {{simple: "${null}"}}
(constant is a text).
# {{setExchangeProperty}} (4x): the schema's closest name is "did you mean
'setExchangePattern'?", which is wrong. Say: the EIP is {{setProperty}} (and
{{setProperties}}, {{removeProperty}}, {{removeProperties}} for
{{setExchangeProperties}} / {{removeExchangeProperty}} /
{{removeExchangeProperties}}).
# a double-quoted value without its closing quote (5x): {{expression:
"$[?(@.sku == '${header.sku}')]}} gets the raw snakeyaml "while parsing a block
mapping ... expected <block end>, but found '<scalar>'". Say: line N starts a
double-quoted value and never closes it: {{expression: "$[?(@.sku ==
'${header.sku}')]"}}.
# {{toD: {uri: ..., options: {...}}}} (2x): "toD: property 'options' is not
defined". Say: toD takes {{parameters:}} like {{to:}}, or the options in the
uri.
# {{library: jackson}} (2x): "library: does not have a value in the enumeration
[Fastjson, Gson, Jackson, Jsonb]". Say: the library name is case sensitive,
write {{library: Jackson}}.
# {{jsonpath: {jsonPath: "..."}}} (2x): "property 'jsonPath' is not defined".
Say: the text goes under {{expression:}}: {{jsonpath: {expression: "$..."}}}.
# {{rest-openapi}} with {{path: "sku=..."}} (1x): "Unknown option 'path'". Say:
a path parameter of the operation comes from a header of the same name:
{{setHeader: {name: sku, ...}}} before the call.
The rows go into SchemaHints (camel-yaml-dsl-validator) and EndpointChecks
(camel-jbang-core) as the earlier rounds did; each gets a test with the model's
YAML.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)