feat(props enhancer): expose endpointProps for EIP/entity#82
feat(props enhancer): expose endpointProps for EIP/entity#82PVinaches merged 1 commit intoKaotoIO:mainfrom
Conversation
04c1378 to
f372920
Compare
src/main/java/io/kaoto/camelcatalog/generators/CamelCatalogSchemaEnhancer.java
Outdated
Show resolved
Hide resolved
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughThis PR enhances the Camel catalog schema generation to enrich endpoint parameter definitions with metadata (title and description). New logic in schema enhancers populates the parameters property with descriptive fields, and multiple catalog files across different Camel versions are updated with this metadata. Additionally, some EIP properties were removed from filtering rules. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Note
Due to the large number of review comments, Critical severity comments were prioritized as inline comments.
🟠 Major comments (29)
catalog/camel-quarkus/3.20.0.redhat-00010/camel-catalog-aggregate-entities-56c4625be36bbcbc73ff2b3d9fd5b2a5.json-20138-20145 (1)
20138-20145:⚠️ Potential issue | 🟠 MajorInvalid JSON Schema:
itemskeyword does not apply to object types.The
itemskeyword is only valid for arrays per JSON Schema specification. When"type": "object"is used,itemsshould be removed—it has no semantic meaning in this context.🛠️ Suggested fix (remove `items`)
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" - }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.20.0.redhat-00010/camel-catalog-aggregate-entities-56c4625be36bbcbc73ff2b3d9fd5b2a5.json` around lines 20138 - 20145, The JSON Schema for the "parameters" property is invalid because it declares "type": "object" while also using the "items" keyword (which only applies to arrays); remove the "items" node under the "parameters" definition (or change "type" to "array" if the intent was a list) and keep the "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" either as the object's schema or wrap it in an array schema depending on intent; update the "parameters" block accordingly so it is either a valid object schema (no "items") or a valid array schema with "items" pointing to the ref.catalog/camel-quarkus/3.20.0.redhat-00010/camel-catalog-aggregate-entities-56c4625be36bbcbc73ff2b3d9fd5b2a5.json-18784-18791 (1)
18784-18791:⚠️ Potential issue | 🟠 MajorInvalid JSON Schema:
itemsis not valid for object types.The
itemskeyword is exclusively for array validation in JSON Schema; using it with"type": "object"violates the specification. This same issue occurs in two locations:
routeTemplate.propertiesSchema.properties.parameters(lines 18784–18791)templatedRoute.propertiesSchema.properties.parametersRemove the
itemskeyword from both object definitions. Consider usingadditionalPropertiesif the schema should allow arbitrary properties on the object.Suggested fix
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" - }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.20.0.redhat-00010/camel-catalog-aggregate-entities-56c4625be36bbcbc73ff2b3d9fd5b2a5.json` around lines 18784 - 18791, The schema entries routeTemplate.propertiesSchema.properties.parameters and templatedRoute.propertiesSchema.properties.parameters wrongly use the "items" keyword while declaring "type": "object"; remove the "items" property from both object definitions and, if the intent is to allow arbitrary keyed values, replace it with an appropriate object schema such as "additionalProperties": { "$ref": "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" } or a defined "properties" map so the JSON Schema is valid.catalog/camel-main/4.4.0.redhat-00046/camel-catalog-aggregate-entities-12e6d089ae8d8b5aa2a70e4ae1573e31.json-8280-8285 (1)
8280-8285:⚠️ Potential issue | 🟠 Major
parametersswitched to object but still usesitems(array-only).
This conflicts withtemplateParameterbeing an array and makes the schema ambiguous for consumers. Also, the “Endpoint Properties” label doesn’t match RouteTemplate parameter semantics.Suggested fix (keep array semantics and align label)
- "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, - "title" : "Endpoint Properties", - "description" : "Endpoint properties description" + "title" : "Template Parameters", + "description" : "Route template parameters"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.4.0.redhat-00046/camel-catalog-aggregate-entities-12e6d089ae8d8b5aa2a70e4ae1573e31.json` around lines 8280 - 8285, The schema for "parameters" is incorrect: it currently uses "type": "object" but defines "items" (array-only) and a mismatched title "Endpoint Properties"; change "parameters" to an array by setting "type": "array" and keep "items": {"$ref":"#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition"} so it matches the existing templateParameter array semantics, and update the "title" to "Route Template Parameters" and the "description" to something like "Route template parameter definitions" to align with RouteTemplateParameterDefinition.catalog/camel-main/4.4.0.redhat-00046/camel-catalog-aggregate-entities-12e6d089ae8d8b5aa2a70e4ae1573e31.json-8714-8719 (1)
8714-8719:⚠️ Potential issue | 🟠 Major
parametersswitched to object but still usesitems(array-only).
This conflicts withparameterbeing an array and makes the schema ambiguous for consumers. Also, the “Endpoint Properties” label doesn’t match TemplatedRoute parameter semantics.Suggested fix (keep array semantics and align label)
- "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, - "title" : "Endpoint Properties", - "description" : "Endpoint properties description" + "title" : "Template Parameters", + "description" : "Templated route parameters"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.4.0.redhat-00046/camel-catalog-aggregate-entities-12e6d089ae8d8b5aa2a70e4ae1573e31.json` around lines 8714 - 8719, The schema for "parameters" is incorrect: it's declared "type": "object" but still uses an "items" array schema and conflicts with the existing "parameter" array; change "parameters" to "type": "array" (to match the array-only "items" usage and the "parameter" semantics), keep the existing "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" as the items schema, and update the title/description from "Endpoint Properties"/"Endpoint properties description" to reflect templated route parameters (e.g., title "Templated Route Parameters" and a description mentioning templated route parameter semantics) so consumers see consistent array semantics and correct labeling.catalog/camel-springboot/4.4.0.redhat-00039/camel-catalog-aggregate-entities-e2370f717dd041ff02faf9793f8f3a19.json-9084-9089 (1)
9084-9089:⚠️ Potential issue | 🟠 MajorFix JSON Schema: change
type: "object"totype: "array"forparameters.The
parametersproperties at these locations declare"type": "object"but include"items", which is invalid JSON Schema—itemsapplies only to arrays. Since these define lists of parameter definitions (via$reftoRouteTemplateParameterDefinitionandTemplatedRouteParameterDefinition), change the type to"array"to align the schema with the intended structure.Suggested fix
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, - "title" : "Endpoint Properties", - "description" : "Endpoint properties description" }"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, - "title" : "Endpoint Properties", - "description" : "Endpoint properties description" }Also applies to: lines 9556-9561
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.4.0.redhat-00039/camel-catalog-aggregate-entities-e2370f717dd041ff02faf9793f8f3a19.json` around lines 9084 - 9089, The schema blocks for the parameters arrays currently declare "type": "object" while also including an "items" field and a $ref to parameter definitions; update those parameter definitions to use "type": "array" instead of "object" for the entries that reference "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" and "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" (the properties named "parameters") so the "items" keyword is valid and the schema correctly represents a list of parameter objects.catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json-20252-20259 (1)
20252-20259:⚠️ Potential issue | 🟠 MajorFix
parametersfield: changetype: "object"totype: "array".The
parametersfield hastype: "object"combined withitemsreferencingTemplatedRouteParameterDefinition, which is invalid JSON Schema. Theitemskeyword only applies to arrays, not objects.This is confirmed by how the same field is correctly defined in other catalog files (aggregate-models): it uses
"type": "array"withjavaType: "java.util.List<org.apache.camel.model.TemplatedRouteParameterDefinition>", indicating parameters is a collection of template parameter definitions, not an object with properties.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json` around lines 20252 - 20259, The "parameters" schema currently declares "type": "object" but uses an "items" entry which is only valid for arrays; update the "parameters" definition so "type" is "array" (to match its semantics as a list of template parameters) and add the corresponding javaType of "java.util.List<org.apache.camel.model.TemplatedRouteParameterDefinition>" if present in other catalogs; ensure the "items" entry still references "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" so the TemplatedRouteParameterDefinition element is preserved.catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json-18891-18898 (1)
18891-18898:⚠️ Potential issue | 🟠 MajorChange
type: "object"totype: "array"for theparametersfield.The
itemskeyword is only valid for array types in JSON Schema. The metadata at line 18827 explicitly declaresjavaType: "java.util.List<org.apache.camel.model.RouteTemplateParameterDefinition>", confirming this field should be an array. The comparabletemplateBeanfield (line 18839) correctly uses"type": "array"with its List javaType. Updateparametersto match this pattern for schema consistency and to comply with JSON Schema specification.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json` around lines 18891 - 18898, The schema for the parameters field is incorrect: change the "parameters" JSON Schema definition's type from "object" to "array" so the "items" entry (which references org.apache.camel.model.RouteTemplateParameterDefinition) is valid; mirror the pattern used by the templateBean array/List javaType and ensure the parameters entry aligns with the declared javaType java.util.List<org.apache.camel.model.RouteTemplateParameterDefinition>.catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-54b73b3cf5b84803f014fabee8b8ed4c.json-20147-20153 (1)
20147-20153:⚠️ Potential issue | 🟠 MajorFix schema inconsistency:
type: objectcannot useitems.Same issue as above:
itemsis invalid for objects. Either revert totype: arrayif this is a list of parameter definitions, or model endpoint properties as an object (additionalProperties/properties).✅ One possible fix (if endpoint properties should be an object)
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" - }, + "additionalProperties" : true, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-54b73b3cf5b84803f014fabee8b8ed4c.json` around lines 20147 - 20153, The schema for the "parameters" property is invalid because it declares "type": "object" but uses "items"; update the "parameters" definition to either be an array of TemplatedRouteParameterDefinition or a proper object map: if it's a list change "type" to "array" and keep "items": {"$ref":"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition"}; if it's a keyed object model "parameters" should keep "type":"object" and replace "items" with "additionalProperties": {"$ref":"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition"} or define explicit "properties" as needed—edit the "parameters" block accordingly to reference org.apache.camel.model.TemplatedRouteParameterDefinition correctly.catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-54b73b3cf5b84803f014fabee8b8ed4c.json-18786-18792 (1)
18786-18792:⚠️ Potential issue | 🟠 MajorFix schema inconsistency:
type: objectcannot useitems.
itemsis only valid for arrays, so this schema is internally inconsistent and may break validation. Either keeptype: arrayif this is a list of parameter definitions, or convert the schema to a proper object representation (e.g.,additionalProperties/properties) for endpoint properties.✅ One possible fix (if endpoint properties should be an object)
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" - }, + "additionalProperties" : true, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-54b73b3cf5b84803f014fabee8b8ed4c.json` around lines 18786 - 18792, The schema for "parameters" is invalid because it declares "type": "object" while using "items" with a $ref to org.apache.camel.model.RouteTemplateParameterDefinition; either change "type" to "array" so "parameters" becomes an array of RouteTemplateParameterDefinition entries, or remove "items" and model "parameters" as an object (using "properties" or "additionalProperties" to map keys to RouteTemplateParameterDefinition) so the "Endpoint Properties"/"parameters" definition is consistent with JSON Schema.catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-69dcfcaaea3e11222d7280becfcfa041.json-18555-18562 (1)
18555-18562:⚠️ Potential issue | 🟠 MajorInvalid JSON Schema:
itemskeyword conflicts withtype: object.The
"items"keyword is only valid for array types in JSON Schema. When"type": "object"is specified, the"items"property is ignored by schema validators, making this definition semantically incorrect.It appears the type was changed from
"array"to"object"but the"items"property was inadvertently retained. Either:
- Remove the
"items"block if this should be a generic object, or- Revert to
"type": "array"if the items reference is intentional.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-69dcfcaaea3e11222d7280becfcfa041.json` around lines 18555 - 18562, The JSON Schema for "parameters" incorrectly sets "type": "object" while still including an "items" entry referencing "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition"; update the "parameters" definition to be consistent by either removing the "items" block if "parameters" should be a plain object, or change "type" to "array" so "items" is valid (i.e., make "parameters" an array of org.apache.camel.model.RouteTemplateParameterDefinition). Ensure the corrected schema preserves the "title" and "description" fields.catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-69dcfcaaea3e11222d7280becfcfa041.json-19891-19898 (1)
19891-19898:⚠️ Potential issue | 🟠 MajorSame issue:
itemskeyword conflicts withtype: object.This has the same JSON Schema validity problem as the
parametersdefinition at line 18555. The"items"referencingTemplatedRouteParameterDefinitionis meaningless when"type": "object".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-69dcfcaaea3e11222d7280becfcfa041.json` around lines 19891 - 19898, The "parameters" schema currently has "type": "object" but uses an "items" array keyword which is invalid; update the "parameters" definition to use a correct object schema referencing org.apache.camel.model.TemplatedRouteParameterDefinition — either change "type" to "array" if parameters should be a list (keep "items": {"$ref":"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition"}) or, if parameters are an object map, remove "items" and use "additionalProperties": {"$ref":"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition"} (or define specific "properties") so that the "parameters" schema and the referenced TemplatedRouteParameterDefinition are consistent.catalog/camel-springboot/4.8.5.redhat-00008/camel-catalog-aggregate-entities-c149a12c422baef62d8784dfe385fd50.json-9804-9810 (1)
9804-9810:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema:
itemswithtype: object.
itemsis only valid for arrays, so schema validators may reject this block. Removeitems(or switchtypeback toarray, which conflicts with the stated objective).🧩 Suggested fix (remove array-only keyword)
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" - }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.8.5.redhat-00008/camel-catalog-aggregate-entities-c149a12c422baef62d8784dfe385fd50.json` around lines 9804 - 9810, The JSON Schema block titled "Endpoint Properties" is invalid because it declares "type": "object" but includes an array-only keyword "items" referencing org.apache.camel.model.RouteTemplateParameterDefinition; remove the "items" property from that schema (or alternatively change "type" to "array" if you intend an array) so the block is valid—locate the schema object with "title": "Endpoint Properties" and delete the "items": { "$ref": "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" } entry.catalog/camel-springboot/4.8.5.redhat-00008/camel-catalog-aggregate-entities-c149a12c422baef62d8784dfe385fd50.json-11139-11146 (1)
11139-11146:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema:
itemswithtype: object.
Same issue here;itemsis array-only. Removeitems(or changetypetoarray, which contradicts the goal).🧩 Suggested fix (remove array-only keyword)
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" - }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.8.5.redhat-00008/camel-catalog-aggregate-entities-c149a12c422baef62d8784dfe385fd50.json` around lines 11139 - 11146, The JSON Schema for the "parameters" definition is invalid because it uses an "items" keyword while declaring "type": "object"; locate the "parameters" schema entry that contains "type" : "object", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" } and remove the "items" property (or alternatively change "type" to "array" if the intent is an array), so update the "parameters" definition to either an object schema without "items" or to an array schema that uses "items" referencing org.apache.camel.model.TemplatedRouteParameterDefinition.catalog/camel-quarkus/3.27.1.redhat-00003/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json-20252-20259 (1)
20252-20259:⚠️ Potential issue | 🟠 MajorSame JSON Schema inconsistency:
itemskeyword invalid withtype: object.This has the same issue as the
RouteTemplateParameterDefinitionparameters above. Theitemskeyword referencingTemplatedRouteParameterDefinitionis meaningless whentypeis"object".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.27.1.redhat-00003/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json` around lines 20252 - 20259, The "parameters" schema incorrectly uses "items" together with "type": "object" (referencing TemplatedRouteParameterDefinition); change the schema to match the intended shape: if parameters is a map/object keyed by parameter name, replace "items" with "additionalProperties" : { "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" } (keep title/description), otherwise if it should be a list of parameter definitions change "type" to "array" and keep the "items" reference; update the "parameters" definition accordingly.catalog/camel-quarkus/3.27.1.redhat-00003/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json-18891-18898 (1)
18891-18898:⚠️ Potential issue | 🟠 MajorJSON Schema inconsistency:
itemskeyword is invalid withtype: object.The
itemskeyword is only meaningful whentypeis"array". Here, changing the type to"object"while retaining"items"creates an invalid schema combination. JSON Schema validators will ignoreitemsfor objects, and UI generators may behave unexpectedly.Either:
- Remove the
itemskeyword if this should be a generic object, or- Retain
type: "array"if this should still referenceRouteTemplateParameterDefinitionitems.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.27.1.redhat-00003/camel-catalog-aggregate-entities-8cdf255edd768ac62ab10a000a1dfe5.json` around lines 18891 - 18898, The "parameters" schema block is invalid because it declares "type": "object" while still using the "items" keyword; update the "parameters" definition that references org.apache.camel.model.RouteTemplateParameterDefinition to use a valid combination by either (A) removing the "items" property and keeping "type": "object" if "parameters" should be a generic object/map, or (B) change "type" to "array" (e.g., "type": "array") and keep "items": {"$ref":"#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition"} if "parameters" is intended to be a list of RouteTemplateParameterDefinition entries, and ensure the "title" and "description" remain accurate for the chosen shape.catalog/camel-springboot/4.10.7.redhat-00013/camel-catalog-aggregate-entities-e000ca44b31db5d7f6ee95765e69ed8c.json-18783-18790 (1)
18783-18790:⚠️ Potential issue | 🟠 MajorJSON Schema semantic conflict:
itemskeyword is invalid withtype: "object".Lines 18785 and 20139 define
itemsalongsidetype: "object". Theitemskeyword only applies to arrays; JSON Schema validators will ignore it for object types, breaking the intended validation.This appears to be a generation error, as most other
parametersfields in this file either omititemsentirely or use the correctpropertieskeyword for object structure (see lines 23323 and 23391).Fix by removing the
itemsblock, or ifparametersshould be an array, changetypeto"array":Line 18783-18790
"parameters" : { "type" : "object", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }Line 20137-20144
"parameters" : { "type" : "object", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.10.7.redhat-00013/camel-catalog-aggregate-entities-e000ca44b31db5d7f6ee95765e69ed8c.json` around lines 18783 - 18790, The JSON Schema for the "parameters" object is invalid because it uses "items" with "type": "object"; locate the "parameters" definitions referencing "$ref": "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" and "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" and fix by either (A) if "parameters" is meant to be an object: remove the "items" block and replace it with an appropriate "properties" schema or a "$ref" directly to the corresponding definition, or (B) if "parameters" is meant to be an array: change "type" to "array" and keep "items" pointing to the referenced definition; ensure the title/description remain unchanged and validate the JSON Schema after the change.catalog/camel-quarkus/3.8.0.redhat-00018/camel-catalog-aggregate-entities-e2370f717dd041ff02faf9793f8f3a19.json-9084-9089 (1)
9084-9089:⚠️ Potential issue | 🟠 MajorRoute template parameters should remain an array.
RouteTemplateParameterDefinitionis an item schema, but the container is now typed asobject, which will invalidate templates that provide parameters as an array. Keep it as an array and avoid the endpoint-properties labeling here.🛠️ Suggested fix
- "parameters" : { - "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" - }, - "title" : "Endpoint Properties", - "description" : "Endpoint properties description" - } + "parameters" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" + }, + "title" : "Template Parameters", + "description" : "Route template parameter definitions" + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.8.0.redhat-00018/camel-catalog-aggregate-entities-e2370f717dd041ff02faf9793f8f3a19.json` around lines 9084 - 9089, The schema block currently declares the RouteTemplateParameterDefinition container as "type": "object" with title "Endpoint Properties", which breaks templates expecting an array; change the container "type" back to "array" and keep the "items" reference to "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" so parameters remain an array, and remove or replace the "Endpoint Properties" title/description with something appropriate (e.g., "Route Template Parameters") to avoid mislabeling.catalog/camel-springboot/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json-20135-20142 (1)
20135-20142:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema:
itemswithtype: "object".At lines 20135-20142,
parametersdeclarestype: "object"with anitemsproperty. In JSON Schema,itemsis only valid for arrays; validators may reject or ignore it, and tooling can drop the schema.Given that the adjacent
beansproperty usestype: "array"withitems, changeparameterstotype: "array"as well.Fix
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json` around lines 20135 - 20142, The "parameters" schema block is invalid because it sets "type": "object" but uses "items" (which is only valid for arrays); update the "parameters" definition to "type": "array" so its "items": { "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" } is valid and matches the adjacent "beans" pattern; ensure the "title" and "description" remain unchanged.catalog/camel-springboot/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json-18775-18782 (1)
18775-18782:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema:
itemswithtype: "object".
itemsis only valid for arrays; withtype: "object"validators may ignore or reject it. This pattern appears in 2 locations affecting theparametersproperty:
/routeTemplate/propertiesSchema/properties/parameters/templatedRoute/propertiesSchema/properties/parametersIf this is a list of
RouteTemplateParameterDefinition, changetypeto"array"; if it's an object map, replaceitemswithadditionalProperties.🛠️ Possible fix (if this is an array)
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json` around lines 18775 - 18782, The JSON Schema for the parameters property is invalid because it declares "type": "object" while using "items"; update both occurrences of the parameters schema (the one under routeTemplate/propertiesSchema/properties/parameters and the one under templatedRoute/propertiesSchema/properties/parameters) to be an array by changing "type" from "object" to "array" so the existing "items": { "$ref": "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" } is valid; ensure the title/description remain and validate the file after the change.catalog/camel-quarkus/3.30.0/camel-catalog-aggregate-entities-bd66f6ad33c8782293f69d20ee6e90ec.json-18999-19005 (1)
18999-19005:⚠️ Potential issue | 🟠 Major
parameterstype conflicts withitemsschema.Lines 19000-19003 and 20384-20387 define
type: "object"while includingitems, which is an array-only keyword in JSON Schema. Whenitemsis paired withtype: "object", validators ignore theitemsconstraint per the JSON Schema spec. Ifparametersshould be an array of ParameterDefinition objects, changetypeto"array"; if it should be an object mapping property names to values, removeitemsand useadditionalPropertiesinstead.🔧 Suggested fix if these are arrays
- "parameters" : { - "type" : "object", + "parameters" : { + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }- "parameters" : { - "type" : "object", + "parameters" : { + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }Also applies to: 20383-20390
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.30.0/camel-catalog-aggregate-entities-bd66f6ad33c8782293f69d20ee6e90ec.json` around lines 18999 - 19005, The schema for "parameters" currently declares "type": "object" while also using "items", which is invalid; update the "parameters" definition(s) (the properties named "parameters" referencing org.apache.camel.model.RouteTemplateParameterDefinition in this JSON) to either (A) change "type" to "array" and keep "items": {"$ref":"#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition"} if "parameters" is meant to be a list, or (B) remove "items" and replace it with an "additionalProperties" schema (or explicit properties) if "parameters" is meant to be an object mapping. Apply the same fix to the other occurrence mentioned (the second "parameters" block that mirrors lines ~20383-20390) so both definitions are consistent.catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json-19012-19018 (1)
19012-19018:⚠️ Potential issue | 🟠 MajorJSON Schema mismatch:
type: "object"combined withitemsis invalid.
Theitemskeyword applies only to arrays in JSON Schema. This pattern occurs in 36+ instances across the catalog (camel-main, camel-quarkus, camel-springboot) in bothrouteTemplateandtemplatedRoutedefinitions. Changetypeto"array"or removeitemsentirely:Proposed fix (for array variant)
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }Apply this fix across all affected catalog files to restore JSON Schema validity.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json` around lines 19012 - 19018, The schema entries under the "parameters" property (used in routeTemplate and templatedRoute definitions) incorrectly declare "type": "object" while also using "items"; update each such occurrence to use "type": "array" so the "items" reference to "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" is valid, then run JSON Schema validation to confirm; apply this change consistently across all affected catalog files (camel-main, camel-quarkus, camel-springboot) where "parameters" contains an "items" key.catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json-20396-20402 (1)
20396-20402:⚠️ Potential issue | 🟠 MajorFix schema type mismatch:
parametersis a List but schema declarestype: "object".The
javaTypeisjava.util.List<org.apache.camel.model.TemplatedRouteParameterDefinition>, indicating an array. Change"type": "object"to"type": "array"to match the Java type and properly apply theitemsconstraint.Proposed fix
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json` around lines 20396 - 20402, The schema for the property named "parameters" is incorrect: it declares "type": "object" while the corresponding javaType is java.util.List<org.apache.camel.model.TemplatedRouteParameterDefinition>, so update the JSON schema for the "parameters" definition (the block containing "title": "Endpoint Properties" and "items": {"$ref":"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition"}) to use "type": "array" instead of "type": "object" so the items constraint is applied correctly and the schema matches the Java type.catalog/camel-main/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json-18775-18782 (1)
18775-18782:⚠️ Potential issue | 🟠 MajorSchema mismatch:
type: objectwithitemsis invalid.
itemsapplies to arrays; keeping it with an object type makes this schema inconsistent and likely breaks validation/consumers. If this is an array ofRouteTemplateParameterDefinition, keeptype: "array"and add metadata.✅ Suggested fix (retain array semantics)
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json` around lines 18775 - 18782, The JSON schema for "parameters" is invalid because it declares "type": "object" while using "items"; update the "parameters" definition to use "type": "array" (so it models an array of RouteTemplateParameterDefinition) and keep the existing "items": {"$ref":"#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition"} plus the title and description; locate the "parameters" schema entry in the catalog JSON (the entry containing "title": "Endpoint Properties" and change its "type" from "object" to "array" so consumers validate correctly.catalog/camel-main/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json-20135-20142 (1)
20135-20142:⚠️ Potential issue | 🟠 MajorSchema mismatch:
type: objectwithitemsis invalid.
itemsapplies to arrays; ifTemplatedRouteParameterDefinitionis a list, keeptype: "array"and attach metadata. Otherwise replaceitemswith object properties.✅ Suggested fix (retain array semantics)
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.14.4/camel-catalog-aggregate-entities-989bce1dcdf4a5fcc9c1140e069466c3.json` around lines 20135 - 20142, The schema for "parameters" is invalid because it declares type: "object" but uses "items"; change the "parameters" schema to type: "array" and keep the "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" under "items" (preserving the "title" and "description"), so the "parameters" entry becomes an array of TemplatedRouteParameterDefinition instances; if instead the intent was a single object, replace "items" with an appropriate "properties" object referencing fields of org.apache.camel.model.TemplatedRouteParameterDefinition.catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-dd03783ba2fc8064fef839eaf2ce5bd6.json-20239-20246 (1)
20239-20246:⚠️ Potential issue | 🟠 MajorSame issue:
itemskeyword incompatible withtype: object.This is the same schema inconsistency as noted in the
RouteTemplateDefinitionparameters block. Theitemskeyword referencingTemplatedRouteParameterDefinitionwill be ignored by JSON Schema validators whentypeisobject.Proposed fix
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" - }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-dd03783ba2fc8064fef839eaf2ce5bd6.json` around lines 20239 - 20246, The "parameters" schema currently uses "items" with "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" while declaring "type": "object", which is invalid; update the "parameters" definition to be an array (change "type" from "object" to "array") so the "items" reference to org.apache.camel.model.TemplatedRouteParameterDefinition is honored, or alternatively remove "items" and define "properties" if the intent is an object—apply this change to the parameters block shown (the schema that references org.apache.camel.model.TemplatedRouteParameterDefinition).catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-dd03783ba2fc8064fef839eaf2ce5bd6.json-18879-18886 (1)
18879-18886:⚠️ Potential issue | 🟠 MajorInvalid JSON Schema:
itemskeyword is incompatible withtype: object.The
itemskeyword only applies whentypeisarray. This field hastype: objectwith anitemskeyword, which violates JSON Schema specification and indicates a conversion error. The original metadata shows this was defined astype: arraywithjavaType: java.util.List<org.apache.camel.model.RouteTemplateParameterDefinition>, but the schema was changed totype: objectwithout removing theitemskeyword. Remove theitemsblock since endpoint properties should be a direct object, not an array.Proposed fix
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" - }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-dd03783ba2fc8064fef839eaf2ce5bd6.json` around lines 18879 - 18886, The "parameters" JSON Schema currently declares "type": "object" but still includes an "items" entry (referencing org.apache.camel.model.RouteTemplateParameterDefinition), which is invalid; remove the entire "items" block so "parameters" remains a plain object schema with its "title" and "description" (i.e., keep "parameters" : { "type": "object", "title": "Endpoint Properties", "description": "Endpoint properties description" } and eliminate the incompatible "items" key).catalog/camel-main/4.8.5.redhat-00008/camel-catalog-aggregate-entities-c149a12c422baef62d8784dfe385fd50.json-9804-9809 (1)
9804-9809:⚠️ Potential issue | 🟠 MajorFix schema inconsistency:
parametershas conflicting"type": "object"and"items"properties.Line 9804 defines
parameterswith"type": "object"but includes"items"referencingRouteTemplateParameterDefinition. In JSON Schema,itemsis only valid for arrays. This creates an invalid schema that JSON Schema validators will reject.Based on the structure (referencing a single definition type via
items), this should be"type": "array". Additionally, the"title": "Endpoint Properties"is misleading for route template parameters and should be clarified.Change line 9804 from
"type": "object"to"type": "array"and update the title/description to reflect template parameters rather than endpoint properties.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.8.5.redhat-00008/camel-catalog-aggregate-entities-c149a12c422baef62d8784dfe385fd50.json` around lines 9804 - 9809, The "parameters" schema is invalid because it declares "type": "object" but uses "items" with a $ref to "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition"; change the "parameters" type to "array" and update its "title" and "description" to clearly refer to route template parameters (e.g., mention RouteTemplateParameterDefinition or "Route Template Parameters") instead of "Endpoint Properties" so the schema is valid and self-descriptive.catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json-20396-20402 (1)
20396-20402:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema:
type: "object"cannot useitemskeyword.The schema violates JSON Schema specification—
itemsis only valid for arrays. This pattern occurs twice:
routeTemplate/propertiesSchema/properties/parameterstemplatedRoute/propertiesSchema/properties/parameters(line 20396)Both have
type: "object"withitemsreferencing parameter definitions. Changetypeto"array"to align with theitemskeyword and correct schema semantics.Suggested fix
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }Apply the same fix to both occurrences.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json` around lines 20396 - 20402, The JSON Schema is invalid because the "parameters" property under routeTemplate/propertiesSchema/properties and templatedRoute/propertiesSchema/properties uses "type": "object" together with an "items" keyword; change the "parameters" schema in both locations (the entries that reference "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition") to use "type": "array" instead of "object" so the "items" field is valid and represents an array of TemplatedRouteParameterDefinition items.catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json-19012-19018 (1)
19012-19018:⚠️ Potential issue | 🟠 MajorFix schema shape:
type: objectconflicts withitemsproperty.The JSON Schema at lines 19012-19018 has
"type": "object"alongside"items", which violates the JSON Schema specification (items is only valid withtype: "array"). This pattern also appears in a second location (templatedRoute > propertiesSchema > properties > parameters).Given that the
itemsproperty references parameter definitions, the intent appears to be an array. Changetypefrom"object"to"array"to correct the schema:Suggested fix
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }Apply the same fix to the
templatedRoutesection.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-1ea1d6bd400a2112ba481dc76ef2267d.json` around lines 19012 - 19018, The schema for the "parameters" property currently declares "type": "object" while also using "items" -> "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition", which is invalid; update the "parameters" property to use "type": "array" (both in the shown location and the other occurrence under "templatedRoute > propertiesSchema > properties > parameters") so the "items" reference is valid and conforms to JSON Schema array semantics.
🟡 Minor comments (3)
catalog/camel-quarkus/3.15.0.redhat-00010/camel-catalog-aggregate-entities-7d539c70d047571f1af94093c294fe34.json-10069-10076 (1)
10069-10076:⚠️ Potential issue | 🟡 MinorRemove redundant
itemskeyword from schema object definitions.
The"items"keyword has no effect when"type": "object"is specified in JSON Schema draft-07—itemsonly applies to arrays. While the schema remains valid, this creates unnecessary confusion for tooling and developers. Found 2 instances in this file:
routeTemplate/propertiesSchema/properties/parameters(lines 10069-10076)templatedRoute/propertiesSchema/properties/parametersRemove the
itemsblock to clarify the schema structure.🔧 Fix for both instances
"parameters" : { "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" - }, "title" : "Endpoint Properties", "description" : "Endpoint properties description" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.15.0.redhat-00010/camel-catalog-aggregate-entities-7d539c70d047571f1af94093c294fe34.json` around lines 10069 - 10076, The schema objects at routeTemplate/propertiesSchema/properties/parameters and templatedRoute/propertiesSchema/properties/parameters currently declare "type": "object" but also include an "items" block (which only applies to arrays); remove the redundant "items" entry from both parameter definitions so each parameters schema contains only the object properties (e.g., keep "type": "object", "title", "description" and any object-specific fields) and validate the JSON to ensure no dangling commas or broken structure after deletion.catalog/camel-quarkus/3.8.0.redhat-00018/camel-catalog-aggregate-entities-e2370f717dd041ff02faf9793f8f3a19.json-9556-9561 (1)
9556-9561:⚠️ Potential issue | 🟡 MinorTemplated route parameters are not endpoint properties.
This field represents template parameter values; labeling it as “Endpoint Properties” can mislead the UI. Consider renaming the title/description to reflect template parameters.🛠️ Suggested fix
- "parameters" : { - "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" - }, - "title" : "Endpoint Properties", - "description" : "Endpoint properties description" - } + "parameters" : { + "type" : "object", + "items" : { + "$ref" : "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" + }, + "title" : "Template Parameters", + "description" : "Templated route parameter values" + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.8.0.redhat-00018/camel-catalog-aggregate-entities-e2370f717dd041ff02faf9793f8f3a19.json` around lines 9556 - 9561, The JSON schema incorrectly labels the array of org.apache.camel.model.TemplatedRouteParameterDefinition as "Endpoint Properties"; update the "title" and "description" fields for that object to reflect template parameters (e.g., change "title" from "Endpoint Properties" to "Template Parameters" and adjust "description" to mention template parameter values), ensuring the schema and UI will display the correct semantic meaning for the field referencing org.apache.camel.model.TemplatedRouteParameterDefinition.src/main/java/io/kaoto/camelcatalog/generators/CamelCatalogSchemaEnhancer.java-384-402 (1)
384-402:⚠️ Potential issue | 🟡 MinorAdd
anyOfhandling to match pattern used in other schema enhancement methods.The method handles
oneOfbut notanyOf. Other schema enhancement methods in this class—such asfillModelFormatInOneOfandfixDefaultValueInArrayFields—explicitly process both constructs. If any schema definitions containanyOfwith nested properties containingparameters, those variants will not be enhanced since the currentif-elselogic treats such schemas as simple cases.Update the implementation to recursively handle
anyOfoptions before processingoneOfor the schema itself, consistent with the pattern used infillModelFormatInOneOf.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/io/kaoto/camelcatalog/generators/CamelCatalogSchemaEnhancer.java` around lines 384 - 402, The enhanceParametersProperty method currently only handles oneOf variants and skips anyOf; update enhanceParametersProperty to first check for "anyOf" and iterate its ArrayNode entries calling enhanceParametersInNode for each object variant (mirroring the pattern used in fillModelFormatInOneOf and fixDefaultValueInArrayFields), then fall back to handling "oneOf" similarly and finally the plain schema by calling enhanceParametersInNode(schema); this ensures anyOf variants with nested parameters are enhanced just like oneOf variants.
f372920 to
e645ff8
Compare
e645ff8 to
0880a2e
Compare
There was a problem hiding this comment.
Note
Due to the large number of review comments, Critical severity comments were prioritized as inline comments.
🟠 Major comments (21)
catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-94570e8c30193028b08ed20979563356.json-20252-20258 (1)
20252-20258:⚠️ Potential issue | 🟠 Major
parametersschema is invalid (type: objectwithitemsfield).This violates JSON schema specification—
itemsis only valid for arrays. The issue appears across all catalog versions. Since these are generated files (peryarn build), regenerate catalogs to resolve. If the issue persists after regeneration, the source schema generation in the Camel project needs correction.For reference, the description states "key-value pairs of properties," which semantically should map to
additionalProperties(object form) rather thanitems(array form).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-94570e8c30193028b08ed20979563356.json` around lines 20252 - 20258, The "parameters" schema is invalid because it uses "type": "object" with an "items" field; update the generated catalog so "parameters" is an object with "additionalProperties": { "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" } (instead of "items"), then regenerate the catalogs via yarn build; if the invalid form reappears after regeneration, fix the source schema generator in the Camel project that emits the "parameters" definition so it maps key-value pairs to additionalProperties for the symbol "parameters" and the referenced definition "org.apache.camel.model.TemplatedRouteParameterDefinition".catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-94570e8c30193028b08ed20979563356.json-18891-18898 (1)
18891-18898:⚠️ Potential issue | 🟠 MajorFix schema inconsistency:
parametersfield hastype: "object"withitems(invalid JSON Schema).The field's Java type is
java.util.List<org.apache.camel.model.RouteTemplateParameterDefinition>, but the schema declares"type": "object"with"items", which violates JSON Schema (items applies only to arrays). Change to"type": "array"to match the intended List structure and fix schema consumers.This is a generated file issue—the fix must be applied in the upstream catalog generator and the catalog regenerated via
yarn build.Suggested fix
"parameters" : { - "type" : "object", - "items" : { - "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" - }, - "title" : "Endpoint Properties", - "description" : "The key-value pairs of the properties to configure this endpoint" + "type" : "array", + "items" : { + "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" + } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.14.2.redhat-00015/camel-catalog-aggregate-entities-94570e8c30193028b08ed20979563356.json` around lines 18891 - 18898, The JSON Schema for the "parameters" property is incorrect: it declares "type": "object" but uses "items" and should represent a List of RouteTemplateParameterDefinition; update the generator so the "parameters" field is emitted as "type": "array" (with "items": {"$ref":"#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition"}) to match the Java type java.util.List<org.apache.camel.model.RouteTemplateParameterDefinition>, then regenerate the catalog via yarn build; locate the generation logic that emits the "parameters" schema for RouteTemplateParameterDefinition and change object->array there.catalog/camel-quarkus/3.15.0.redhat-00010/camel-catalog-aggregate-entities-5a13f0f11099b4f8c57d78296c762af4.json-10070-10075 (1)
10070-10075:⚠️ Potential issue | 🟠 MajorFix schema mismatch:
parametersshould usetype: arraywithitems, nottype: object.The schema at both locations (RouteTemplate parameters and TemplatedRoute parameters) declares
type: objectwhile includingitemskeyword, which is invalid JSON Schema. The javaType metadata clearly indicates these arejava.util.List(arrays), not object maps. Compare to thebeansfield which correctly usestype: arraywithitems. Either change totype: arraywithitemsto match the javaType, or migrate totype: objectwithadditionalPropertiesif object maps are intended, then removeitems.This appears to be a catalog generation issue. Verify the fix in the catalog generator and rebuild using
yarn build.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.15.0.redhat-00010/camel-catalog-aggregate-entities-5a13f0f11099b4f8c57d78296c762af4.json` around lines 10070 - 10075, The schema for the "parameters" property is incorrect: update the "parameters" entries for org.apache.camel.model.RouteTemplateParameterDefinition and org.apache.camel.model.TemplatedRouteParameterDefinition to use "type": "array" (retain the existing "items" ref to `#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition`) since javaType is java.util.List; alternatively, if a map was intended, remove "items" and switch to "type": "object" with "additionalProperties" schema. After fixing the definitions in the catalog generator output, rebuild the catalog (yarn build) to verify the change.catalog/camel-main/4.8.5.redhat-00008/camel-catalog-aggregate-entities-dc61e522d3ce3630726e4fb8250fac49.json-9804-9810 (1)
9804-9810:⚠️ Potential issue | 🟠 MajorThis schema issue requires upstream resolution in Apache Camel, not local fixes.
The
"type": "object"with"items"pattern is invalid in JSON Schema draft-07 and is widespread across all catalog versions. However, these files are generated by thecatalog-generatorMaven project, which depends on Apache Camel'scamel-catalogJAR. The schema is generated by Camel's code, not authored in this repository.Per the coding guideline, catalog files should be committed after running
yarn build, which means any manual JSON edits will be overwritten on the next build. The fix must be addressed upstream in Apache Camel's schema generation code (currently using Camel 4.16.0 perpom.xml). This should be reported to the Apache Camel project to update their schema generator to useadditionalPropertiesinstead ofitemsfor object types.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.8.5.redhat-00008/camel-catalog-aggregate-entities-dc61e522d3ce3630726e4fb8250fac49.json` around lines 9804 - 9810, The JSON Schema for the "Endpoint Properties" entry incorrectly uses "type": "object" together with "items" (see the "Endpoint Properties" title and its $ref to org.apache.camel.model.RouteTemplateParameterDefinition), which is invalid; this is generated by the catalog-generator using the camel-catalog JAR from Apache Camel, so instead of editing catalog files here, open an upstream issue/PR against Apache Camel's schema generation (in camel-catalog / catalog-generator code) to replace use of "items" for object types with "additionalProperties" (or otherwise emit a proper object schema), reference the generator module and the org.apache.camel.model.RouteTemplateParameterDefinition mapping so the produced JSON uses additionalProperties: { "$ref": ... } and re-run the catalog-generator in upstream to produce fixed catalog artifacts.catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-e4d2992b9c4cc763488818d0fcdb8cdc.json-19891-19897 (1)
19891-19897:⚠️ Potential issue | 🟠 MajorSchema mismatch:
type: objectwithitemsis incorrect and appears systematically across all generated catalog aggregate-entities files.The
itemsproperty is only valid fortype: arrayper JSON Schema specification. ThejavaTypeconsistently declaresjava.util.List<org.apache.camel.model.TemplatedRouteParameterDefinition>, confirming the parameters should be an array. The correct schema should usetype: arraywithitems(matching the models and YAML DSL catalog files), or if object is required, replaceitemswithadditionalProperties.This issue is systematic across all versions (4.4.0 through 4.17.0) in the aggregate-entities catalog files and points to a code generation bug. Regenerate the catalogs with
yarn buildto fix.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-e4d2992b9c4cc763488818d0fcdb8cdc.json` around lines 19891 - 19897, The JSON schema for the "parameters" property is incorrect: it declares "type": "object" while also providing "items" (which is only valid for arrays) and the javaType indicates a List<java.util.List<org.apache.camel.model.TemplatedRouteParameterDefinition>> (java.util.List<org.apache.camel.model.TemplatedRouteParameterDefinition>) so update the schema generation to emit "type": "array" with the existing "items": {"$ref":"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition"} for the "parameters" property (or, if an object map is intended, replace "items" with "additionalProperties" and adjust javaType accordingly), then regenerate the aggregate-entities catalogs via the build (yarn build) to apply the fix across all affected files.catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-e4d2992b9c4cc763488818d0fcdb8cdc.json-18555-18561 (1)
18555-18561:⚠️ Potential issue | 🟠 MajorThis is a generated file; the schema issue must be fixed upstream in the source code.
The schema mismatch in
parametersis real and consistent across all catalog versions:"type": "object"with"items"is invalid in JSON Schema (items only applies to arrays). However, since catalog files are generated byyarn build, manually fixing them here won't address the root cause.The
parametersfield contradicts itself:
- Description: "The key-value pairs of the properties"
- But:
"type": "object"with"items"(neither object maps nor arrays are properly expressed)- In camelYamlDsl files, the same field correctly uses
"type": "array"The fix must be applied to the source code that generates these catalogs (likely Apache Camel's schema generation). Regenerate the catalogs after that upstream fix is in place.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.10.7.redhat-00009/camel-catalog-aggregate-entities-e4d2992b9c4cc763488818d0fcdb8cdc.json` around lines 18555 - 18561, The generated JSON schema wrongly defines "parameters" with "type": "object" together with an "items" key (invalid in JSON Schema) for the RouteTemplateParameterDefinition; update the upstream schema generator where the catalog is produced so "parameters" is emitted as the correct type (likely "array" with items referencing "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" as done in camelYamlDsl) instead of an object with items, then re-run the build (yarn build) to regenerate the catalog JSON files; search for the generator code that builds the parameters node (or the component that maps RouteTemplateParameterDefinition) and change the output shape to an array schema, preserving the title/description.catalog/camel-quarkus/3.8.0.redhat-00018/camel-catalog-aggregate-entities-5f40a8be3d508d5e7dd19d27a49bb657.json-9084-9090 (1)
9084-9090:⚠️ Potential issue | 🟠 MajorFix JSON Schema keyword mismatch in all generated catalog files: replace
itemswithadditionalPropertiesfor object-type parameters.The
parametersdeclarations in bothrouteTemplateandtemplatedRouteacross all 18 catalog files incorrectly combinetype: "object"withitems, which violates JSON Schema draft-07 (items applies only to arrays). Since the description indicates "key-value pairs" (object semantics), changeitemstoadditionalProperties:Fix for parameters declarations
"parameters" : { "type" : "object", - "items" : { + "additionalProperties" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title" : "Endpoint Properties", "description" : "The key-value pairs of the properties to configure this endpoint" }This affects all catalog versions (camel-main, camel-quarkus, camel-springboot) at lines 9084-9090 and 9556-9562 respectively. Since these are generated files, apply the fix upstream in the catalog generation process.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.8.0.redhat-00018/camel-catalog-aggregate-entities-5f40a8be3d508d5e7dd19d27a49bb657.json` around lines 9084 - 9090, The JSON Schema for route template parameters wrongly uses "items" on an object; locate the parameters declarations referencing org.apache.camel.model.RouteTemplateParameterDefinition (the block with "type" : "object", "title" : "Endpoint Properties", "description" : "The key-value pairs...") and replace the "items" property with "additionalProperties" so the schema expresses key-value pairs correctly, and then update the catalog generation code that emits these definitions so all generated files (routeTemplate/templatedRoute parameters) use additionalProperties for object-type parameters going forward.catalog/camel-springboot/4.8.5.redhat-00008/camel-catalog-aggregate-entities-dc61e522d3ce3630726e4fb8250fac49.json-9804-9810 (1)
9804-9810:⚠️ Potential issue | 🟠 MajorRemove
itemsfrom object-typedparametersin generated schema.The
parametersproperty hastype: "object"but still containsitems, which is invalid in JSON Schema draft‑07 sinceitemsis only valid for arrays. The description confirmsparametersshould be key-value pairs (object map). Removeitemsduring schema generation inCamelCatalogSchemaEnhancer.setParametersMetadata()to ensure valid schema output.This issue appears in two locations:
- Lines 9804-9810 (RouteTemplateParameterDefinition reference)
- Lines 11140-11146 (TemplatedRouteParameterDefinition reference)
Proposed fix in generator code
Modify
setParametersMetadata()insrc/main/java/io/kaoto/camelcatalog/generators/CamelCatalogSchemaEnhancer.javato remove theitemsfield:private void setParametersMetadata(ObjectNode parameters) { parameters.put("type", "object"); parameters.put("title", "Endpoint Properties"); parameters.put("description", "The key-value pairs of the properties to configure this endpoint"); + parameters.remove("items"); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.8.5.redhat-00008/camel-catalog-aggregate-entities-dc61e522d3ce3630726e4fb8250fac49.json` around lines 9804 - 9810, The generated JSON Schema incorrectly leaves an "items" property on object-typed "parameters"; in CamelCatalogSchemaEnhancer.setParametersMetadata() detect when the property schema has "type" equal to "object" (instead of "array") and remove the "items" entry before writing the schema so the output for RouteTemplateParameterDefinition and TemplatedRouteParameterDefinition no longer contains an "items" field; update setParametersMetadata() to check the parameter node/type and drop items for object maps while leaving items intact for arrays.catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json-20396-20403 (1)
20396-20403:⚠️ Potential issue | 🟠 MajorSame invalid JSON Schema issue:
type: "object"withitemskeyword.Identical problem as the
RouteTemplateParameterDefinitioncase—thisTemplatedRouteParameterDefinitionis meant to be an array of template parameters, not endpoint properties. The schema now has an invalidtype: "object"combined withitems.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json` around lines 20396 - 20403, The JSON Schema defines "parameters" as type: "object" while using an "items" array reference to "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition", which is invalid; change "parameters" to type: "array" (or remove the "items" if it truly should be an object) so it correctly represents an array of TemplatedRouteParameterDefinition entries. Locate the "parameters" property in the JSON (the one referencing org.apache.camel.model.TemplatedRouteParameterDefinition) and update its "type" to "array" and keep the "items" ref to TemplatedRouteParameterDefinition, ensuring the "title"/"description" still match the intended meaning (template parameters rather than endpoint property map).catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json-19012-19019 (1)
19012-19019:⚠️ Potential issue | 🟠 MajorRemove invalid schema metadata from route template parameters.
The
parametersfield in the RouteTemplateDefinition schema incorrectly hastype: "object"with anitemsproperty. In JSON Schema,itemsis only valid fortype: "array". This field should betype: "array"since it references an array ofRouteTemplateParameterDefinitionobjects.The
CamelCatalogSchemaEnhancer.setParametersMetadata()method unconditionally applies "Endpoint Properties" metadata to anyparametersfield, but this enhancement should not apply to route template parameters. The fix should excludeRouteTemplateDefinition(and similar models with array-type parameters) from this enhancement, or check if the parameters field already contains anitemsproperty before modifying its type.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json` around lines 19012 - 19019, The schema wrongly sets "parameters" to type "object" with an "items" property for RouteTemplateDefinition; update CamelCatalogSchemaEnhancer.setParametersMetadata() to skip enhancing parameters that already have an "items" entry or that belong to RouteTemplateDefinition (or other array-typed parameter models) so "parameters" remains an array of RouteTemplateParameterDefinition; specifically detect the "parameters" property node, if it contains an "items" key do not override its type/metadata, or add a guard that excludes model name "RouteTemplateDefinition" before applying the "Endpoint Properties" metadata.catalog/camel-quarkus/3.30.0/camel-catalog-aggregate-entities-545b9fc16df599ef7845d069bc3a745a.json-18999-19005 (1)
18999-19005:⚠️ Potential issue | 🟠 MajorSchema mismatch:
objectwithitemsis invalid JSON Schema.Found 2 instances in this generated catalog file where
typeis set toobjectbutitemsis also defined—itemsis only valid for arrays. This breaks schema validation:
$.routeTemplate.propertiesSchema.properties.parameters$.templatedRoute.propertiesSchema.properties.parametersSince this is a generated catalog file, regenerate it by running
yarn buildafter the upstream camel-quarkus source is fixed to use either"type": "array"withitemsor"type": "object"withadditionalPropertiesinstead.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.30.0/camel-catalog-aggregate-entities-545b9fc16df599ef7845d069bc3a745a.json` around lines 18999 - 19005, The JSON schema for the parameters property is invalid because it sets "type":"object" while also including "items"; update the two occurrences referenced as routeTemplate.propertiesSchema.properties.parameters and templatedRoute.propertiesSchema.properties.parameters to use a valid schema shape (either change "type" to "array" when keeping "items", or keep "type":"object" and replace "items" with an "additionalProperties" schema describing org.apache.camel.model.RouteTemplateParameterDefinition), then regenerate the catalog JSON by running yarn build once the upstream camel-quarkus source is fixed so the generated file is correct.catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-5e435c2b580a78740022d5c12cc01b02.json-20237-20246 (1)
20237-20246:⚠️ Potential issue | 🟠 MajorFix JSON Schema inconsistency:
itemscannot be used withtype: "object".Both
parametersschemas at lines 18880–18882 (RouteTemplateParameterDefinition) and 20240–20242 (TemplatedRouteParameterDefinition) incorrectly combine"type": "object"with"items". Per JSON Schema spec,itemsonly applies to arrays; with object type, it is ignored and does not validate object properties.Given the description "The key-value pairs of the properties to configure this endpoint", these should use
"additionalProperties"(pointing to the parameter definition) instead of"items".This is a generated catalog file; regenerate by running
yarn build.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-5e435c2b580a78740022d5c12cc01b02.json` around lines 20237 - 20246, The schema for "parameters" incorrectly uses "type": "object" together with "items" (which only applies to arrays); update the "parameters" definitions that reference org.apache.camel.model.TemplatedRouteParameterDefinition and org.apache.camel.model.RouteTemplateParameterDefinition to replace "items": { "$ref": "...TemplatedRouteParameterDefinition" } with "additionalProperties": { "$ref": "...TemplatedRouteParameterDefinition" } (so the object validates as key-value pairs), then regenerate the catalog (yarn build) to ensure the change is applied across generated files.catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-5e435c2b580a78740022d5c12cc01b02.json-18877-18886 (1)
18877-18886:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema in RouteTemplate parameters field:
itemskeyword is incompatible withtype: "object"The
parametersproperty uses"items"keyword with"type": "object", which violates JSON Schema specification. Theitemskeyword is only valid for array types. For object types representing key-value endpoint properties, the correct keyword isadditionalProperties.This issue appears in at least two locations in the Quarkus 3.27.2 catalog:
routeTemplateproperties/parameterstemplatedRouteproperties/parametersThe schema enhancer should either:
- Replace
itemswithadditionalPropertieswhen the parameters represent an object with key-value pairs, or- Ensure the type is
arrayif parameters should be an array of RouteTemplateParameterDefinition objects🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.27.2/camel-catalog-aggregate-entities-5e435c2b580a78740022d5c12cc01b02.json` around lines 18877 - 18886, The JSON Schema for the "parameters" property in routeTemplate/templatedRoute wrongly uses "items" with "type": "object"; update the schema generation so that when "parameters" is intended as a key-value map of RouteTemplateParameterDefinition (symbols: "parameters", "RouteTemplateParameterDefinition", "routeTemplate", "templatedRoute") you replace the "items" keyword with "additionalProperties": { "$ref": "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" } and keep "type": "object", otherwise if "parameters" should be an array change "type" to "array" and keep "items" pointing to RouteTemplateParameterDefinition; modify the schema enhancer logic that emits parameter schemas to perform this conditional replacement.catalog/camel-quarkus/3.20.0.redhat-00010/camel-catalog-aggregate-entities-d6dc7e5e2fdebb2050118b8d4f83e0d2.json-18785-18790 (1)
18785-18790:⚠️ Potential issue | 🟠 MajorGenerator bug:
CamelCatalogSchemaEnhancer.setParametersMetadata()incorrectly converts parameter arrays to invalid objects.At lines 18785–18790 and 20139–20144, the
parametersproperties have"type": "object"with"items"still referencingRouteTemplateParameterDefinition/TemplatedRouteParameterDefinition. In JSON Schema,itemsapplies only to arrays; combining it with"type": "object"is semantically invalid and breaks schema validation and UI rendering.The root cause is in
CamelCatalogSchemaEnhancer.java(lines 435–439): thesetParametersMetadata()method unconditionally sets"type": "object"on parameters without checking whetheritemsalready exists. For actual parameter-definition arrays, it should either preserve"type": "array"or convert properly by removingitemsand addingadditionalPropertiesinstead.Fix the generator method to handle parameter arrays correctly before regenerating the catalog.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.20.0.redhat-00010/camel-catalog-aggregate-entities-d6dc7e5e2fdebb2050118b8d4f83e0d2.json` around lines 18785 - 18790, The generator is turning parameter arrays into invalid objects by unconditionally setting "type":"object" in CamelCatalogSchemaEnhancer.setParametersMetadata(); update that method to detect when a parameters property already has an "items" entry (indicating an array of RouteTemplateParameterDefinition or TemplatedRouteParameterDefinition) and either preserve "type":"array" or convert to a proper object shape by removing "items" and adding "additionalProperties" accordingly; ensure you only set "type":"object" for true map-like parameter definitions and leave existing array schemas (with "items") unchanged.catalog/camel-springboot/4.10.7.redhat-00013/camel-catalog-aggregate-entities-11fe2ecab73d4e991bd2138370f46534.json-18783-18790 (1)
18783-18790:⚠️ Potential issue | 🟠 MajorFix
setParametersMetadatato remove the incompatibleitemskeyword when settingtype: "object".The
parametersproperty in the catalog file has both"type": "object"and"items"keywords. According to JSON Schema specification (draft-07),itemsis only valid for array types and is incompatible withtype: "object". This creates an invalid schema structure that validators may reject.The
setParametersMetadatamethod inCamelCatalogSchemaEnhancer.java(lines 435-438) sets the type to object but does not remove any pre-existingitemskeyword. The fix should explicitly remove theitemsproperty when changing the type:private void setParametersMetadata(ObjectNode parameters) { parameters.put("type", "object"); parameters.remove("items"); // Remove incompatible keyword parameters.put("title", "Endpoint Properties"); parameters.put("description", "The key-value pairs of the properties to configure this endpoint"); }Regenerate the catalog files after this fix by running
yarn buildper the coding guidelines.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.10.7.redhat-00013/camel-catalog-aggregate-entities-11fe2ecab73d4e991bd2138370f46534.json` around lines 18783 - 18790, The setParametersMetadata method is setting "type":"object" on the parameters schema but leaves an existing incompatible "items" keyword, producing invalid JSON Schema; update CamelCatalogSchemaEnhancer.setParametersMetadata to remove the "items" property from the provided ObjectNode (parameters.remove("items")) before setting type/title/description so the "parameters" schema does not contain array-only keywords; after the change regenerate the catalog files (yarn build).catalog/camel-springboot/4.10.7.redhat-00013/camel-catalog-aggregate-entities-11fe2ecab73d4e991bd2138370f46534.json-20137-20144 (1)
20137-20144:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema in RouteTemplate and TemplatedRoute
parametersdefinitions.The
parametersproperty usestype: "object"with anitemskeyword at both lines 20137-20144 and line 18783. Theitemskeyword is invalid for object types in JSON Schema and should only be used with arrays. Given the description "key-value pairs of the properties," this should useadditionalPropertiesinstead to properly define a map of parameter definitions.This pattern appears to be a generator bug affecting at least RouteTemplateDefinition and TemplatedRouteDefinition. The catalog file must be regenerated after fixing the underlying generator code.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.10.7.redhat-00013/camel-catalog-aggregate-entities-11fe2ecab73d4e991bd2138370f46534.json` around lines 20137 - 20144, The JSON Schema for the "parameters" property in RouteTemplateDefinition and TemplatedRouteDefinition is invalid because it declares "type":"object" but uses an "items" keyword; change each "parameters" definition to keep "type":"object" and replace the "items": { "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" } with "additionalProperties": { "$ref": "#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" } so the property correctly models a map of parameter objects, remove the invalid "items" key, and after fixing the generator output regenerate the catalog JSON so the change is applied throughout the file.catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-6b15c1dd9c076f2941fa77f3c92eed2f.json-18786-18793 (1)
18786-18793:⚠️ Potential issue | 🟠 MajorSchema mismatch in parameters:
type: "object"withitemsfield is invalid JSON Schema.The
parametersproperty has conflicting schema declarations. In JSON Schema,itemsapplies only to arrays; declaring it alongsidetype: "object"is invalid and validators will ignore theitemsreference toRouteTemplateParameterDefinition, breaking the intended array structure.The camelYamlDsl schema correctly defines this as
type: "array"withitems, but the aggregate-entities catalog has it incorrectly astype: "object"withitems. This mismatch was introduced by thesetParametersMetadata()method inCamelCatalogSchemaEnhancer.java(line 439), which overwrites the type to "object" without removing or adapting theitemsfield.Fix by restoring
type: "array"in the aggregated catalog, or ensure the enhancer preserves the original array type when parameters already contains anitemsreference.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-6b15c1dd9c076f2941fa77f3c92eed2f.json` around lines 18786 - 18793, The schema for the "parameters" property was incorrectly set to type:"object" while still containing an "items" reference; update the logic in setParametersMetadata() in CamelCatalogSchemaEnhancer.java so that when a "parameters" node already has an "items" child (or represents an array in the source/camelYamlDsl) you preserve or restore type:"array" instead of overwriting it to "object" (or remove the "items" when you truly intend an object); locate the code path that sets parameters' type and change it to detect existing "items" (or the source array metadata) and set type to "array" accordingly to keep the RouteTemplateParameterDefinition items reference valid.catalog/camel-springboot/4.14.4/camel-catalog-aggregate-entities-1b48cd6f9da7ca2c209d5e55b1ca9adc.json-18775-18782 (1)
18775-18782:⚠️ Potential issue | 🟠 MajorFix invalid JSON Schema in catalog: remove
itemskeyword whentypeisobject.The parameters blocks in the catalog files retain an
"items"keyword alongside"type": "object". In JSON Schema,itemsis only valid fortype: "array". This pattern appears in 158 catalog files across multiple versions.Root cause: The
setParametersMetadata()method inCamelCatalogSchemaEnhancer.javasetstypeto"object"but does not remove the pre-existingitemskeyword that was originally part of the array-type definition. The method must either remove theitemskeyword or not change the type if the original structure should remain an array.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.14.4/camel-catalog-aggregate-entities-1b48cd6f9da7ca2c209d5e55b1ca9adc.json` around lines 18775 - 18782, The parameters schema is incorrectly keeping an "items" property when you change its "type" to "object"; update setParametersMetadata in CamelCatalogSchemaEnhancer.java so that when you set the parameters node's "type" to "object" (the JSON key "parameters"), you also remove any existing "items" property from that JSON object (or skip changing the type if the original node should remain an array), ensuring the "parameters" object node no longer contains "items" alongside "type":"object".catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json-20396-20403 (1)
20396-20403:⚠️ Potential issue | 🟠 MajorSame issue: Invalid JSON Schema structure for template parameters
Similar to the earlier case—
"type": "object"combined with"items"referencingTemplatedRouteParameterDefinition. This is both schema-invalid and semantically incorrect (these are templated route parameters, not endpoint properties).The generator logic should exclude these template parameter definitions from the endpoint properties enhancement.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json` around lines 20396 - 20403, The JSON schema incorrectly defines "parameters" as an object while also using "items" to reference org.apache.camel.model.TemplatedRouteParameterDefinition (which is an array construct and semantically represents templated route parameters, not endpoint properties); update the generator logic so it does not inject templated route parameter definitions into the endpoint properties enhancement—remove or guard the code path that adds a "$ref" to org.apache.camel.model.TemplatedRouteParameterDefinition under the "parameters" property and instead produce either a proper object schema (with "properties") for endpoint properties or an array schema if templated parameters are intended, ensuring "parameters" is not mixed with "items" when its "type" is "object".catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json-19012-19019 (1)
19012-19019:⚠️ Potential issue | 🟠 MajorRemove or refactor
itemsfield fromparametersproperty schemaThe
parametersproperty uses"type": "object"with an"items"keyword. While JSON Schema permits this,itemshas no effect on object instances (it only applies to arrays). The presence ofitemswith a$reftoRouteTemplateParameterDefinitionconflicts with the intended semantics: this property represents key-value pairs, which should be modeled using"additionalProperties"instead.Correct structure for object with dynamic key-value pairs:
"parameters": { "type": "object", "additionalProperties": { "$ref": "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, "title": "Endpoint Properties", "description": "The key-value pairs of the properties to configure this endpoint" }The fix should be applied in the generator logic (likely where the
parametersschema is initially constructed) to useadditionalPropertiesinstead ofitems.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-springboot/4.17.0/camel-catalog-aggregate-entities-59c72e4459a633df9506a527d11cd0d7.json` around lines 19012 - 19019, The "parameters" schema incorrectly uses "items" on an object type (no effect for objects) and should model dynamic key-value pairs with "additionalProperties"; update the generator logic that builds the "parameters" property (the schema object named "parameters" that references org.apache.camel.model.RouteTemplateParameterDefinition) to remove the "items" entry and emit "additionalProperties": { "$ref": "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" } while preserving "type":"object", "title" and "description".catalog/camel-quarkus/3.27.1.redhat-00003/camel-catalog-aggregate-entities-94570e8c30193028b08ed20979563356.json-18891-18898 (1)
18891-18898:⚠️ Potential issue | 🟠 MajorFix schema conflict in RouteTemplateDefinition parameters field.
The
"parameters"field incorrectly uses"type": "object"with an"items"field, which violates JSON Schema semantics. The source model shows this is ajava.util.List<RouteTemplateParameterDefinition>(array type), and the "Endpoint Properties" metadata is inapplicable to template parameters. Change"type"to"array"and remove the misleading endpoint-properties metadata.Suggested correction
"parameters" : { - "type" : "object", + "type" : "array", "items" : { "$ref" : "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" }, - "title" : "Endpoint Properties", - "description" : "The key-value pairs of the properties to configure this endpoint" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-quarkus/3.27.1.redhat-00003/camel-catalog-aggregate-entities-94570e8c30193028b08ed20979563356.json` around lines 18891 - 18898, The "parameters" property in the RouteTemplateDefinition JSON schema is incorrectly declared as an object with an "items" array and endpoint-specific metadata; update the "parameters" schema to reflect its actual type list: change the "type" from "object" to "array", keep the "$ref" to "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition" as the item schema, and remove the misleading endpoint-specific "title" and "description" ("Endpoint Properties" and its description) so the field correctly models java.util.List<RouteTemplateParameterDefinition>.
🟡 Minor comments (2)
catalog/camel-main/4.4.0.redhat-00046/camel-catalog-aggregate-entities-11ecfa4943e11c456938928c05bfd040.json-8279-8286 (1)
8279-8286:⚠️ Potential issue | 🟡 MinorFix invalid JSON Schema:
parametershas incompatibletype: "object"withitemskeyword (array-only).Lines 8279-8286 and 8713-8720 define
parametersastype: "object"but retain theitemsfield. In JSON Schema,itemsis only valid for arrays. The source YAML DSL schema defines these astype: "array", but the schema enhancement code changes them to objects without removingitems. Either:
- Remove
itemsifparametersshould be an object mapping property names to RouteTemplateParameterDefinition values, OR- Revert to
type: "array"ifparametersshould remain an array of parameter objectsThe current state violates JSON Schema semantics and may confuse validation tooling.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.4.0.redhat-00046/camel-catalog-aggregate-entities-11ecfa4943e11c456938928c05bfd040.json` around lines 8279 - 8286, The JSON Schema entry for the property named "parameters" currently has "type": "object" while still including an "items" keyword referencing "#/definitions/org.apache.camel.model.RouteTemplateParameterDefinition", which is invalid; update both occurrences of this "parameters" property so that the schema is consistent by changing "type" from "object" to "array" (so "items" remains valid) to match the original DSL intent (an array of RouteTemplateParameterDefinition), or alternatively remove the "items" if you truly intend a keyed object mapping—but prefer setting "type": "array" to preserve the existing "items" reference and schema semantics.catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-6b15c1dd9c076f2941fa77f3c92eed2f.json-20147-20154 (1)
20147-20154:⚠️ Potential issue | 🟡 MinorFix the schema mismatch in the generator, not the catalog file.
This catalog file is generated by
yarn build. The actual issue is inCamelCatalogSchemaEnhancer.javaline 436, wheresetParametersMetadata()setstype: "object"but does not remove theitemsproperty that came from the source YAML schema. This creates an invalid JSON Schema:type: "object"withitems(which only applies to arrays) makes array semantics ineffective.To fix: either (1) change the enhancement to use
type: "array"if parameters should be a list, or (2) iftype: "object"is intended, replaceitemswithadditionalPropertiesand remove the$reftoTemplatedRouteParameterDefinition.After fixing the generator, regenerate the catalogs by running
yarn build.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@catalog/camel-main/4.14.2.redhat-00011/camel-catalog-aggregate-entities-6b15c1dd9c076f2941fa77f3c92eed2f.json` around lines 20147 - 20154, The generator is producing invalid JSON Schema because CamelCatalogSchemaEnhancer.java's setParametersMetadata() sets "type":"object" but leaves an "items" entry; update setParametersMetadata() so that when parameters are intended as an object it removes the "items" node and replaces it with an "additionalProperties" schema (copying/transforming the $ref to org.apache.camel.model.TemplatedRouteParameterDefinition as the additionalProperties value), or if parameters are actually an array switch the type to "array" and keep items; after changing setParametersMetadata() run yarn build to regenerate the catalogs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In
`@catalog/camel-main/4.8.5.redhat-00008/camel-catalog-aggregate-entities-dc61e522d3ce3630726e4fb8250fac49.json`:
- Around line 11139-11146: The "parameters" schema is invalidly combining
"type":"object" with an "items" array schema; mirror the fix used for the
routeTemplate segment by replacing the incorrect "items" usage with an
object-style mapping: remove "items" and add "additionalProperties": { "$ref":
"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" } (keep
"title" and "description" as-is) so "parameters" becomes a JSON object whose
values are TemplatedRouteParameterDefinition entries.
In
`@catalog/camel-quarkus/3.27.1.redhat-00003/camel-catalog-aggregate-entities-94570e8c30193028b08ed20979563356.json`:
- Around line 20252-20258: The "parameters" schema incorrectly declares "type":
"object" while also using an "items" ref to
"#/definitions/org.apache.camel.model.TemplatedRouteParameterDefinition" and is
titled "Endpoint Properties"; change the "parameters" definition to an array
schema (set "type": "array") with the existing "items" pointing to
org.apache.camel.model.TemplatedRouteParameterDefinition so it matches the
earlier fix for the same block and resolves the mismatch.
Expose Endpoint Properties for EIP/entities that require uri to be filled and for EIP/entities that adds them directly in kaoto repo.
This PR is built over PR #81 so it needs to be merged after it.
Fix: KaotoIO/kaoto#2968
Summary by CodeRabbit
New Features
Refactor
Tests