Skip to content

Commit

Permalink
fix(969) - Camel Catalog plugin - write default boolean values to boo…
Browse files Browse the repository at this point in the history
…lean
  • Loading branch information
tplevko committed Mar 28, 2024
1 parent d27f684 commit e74521b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ private void doProcessParameter(EipModel entityCatalog, String propertyName, Obj
if (catalogOption.getDefaultValue() != null) {
if ("array".equals(propertyType)) {
propertySchema.withArray("/default").add(catalogOption.getDefaultValue().toString());
} else if ("boolean".equals(propertyType)) {
propertySchema.put("default", Boolean.valueOf(catalogOption.getDefaultValue().toString()));
} else {
propertySchema.put("default", catalogOption.getDefaultValue().toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Test for root containers', () => {
cy.get(`input[name="inputType.id"]`).clear().type('test.inputType.id');
cy.get(`input[name="inputType.urn"]`).clear().type('test.inputType.urn');
cy.get(`input[name="inputType.validate"]`).check();
cy.get(`input[name="logMask"]`).uncheck();
cy.get(`input[name="logMask"]`).check();
cy.get(`input[name="messageHistory"]`).check();
cy.get(`input[name="nodePrefixId"]`).clear().type('test.nodePrefixId');
cy.get(`input[name="outputType.description"]`).clear().type('test.outputType.description');
Expand All @@ -79,8 +79,7 @@ describe('Test for root containers', () => {
cy.checkCodeSpanLine('id: test.inputType.id');
cy.checkCodeSpanLine('urn: test.inputType.urn');
cy.checkCodeSpanLine('validate: true');
// Blocked by - https://github.com/KaotoIO/kaoto-next/issues/861
// cy.checkCodeSpanLine('logMask: false');
cy.checkCodeSpanLine('logMask: true');
cy.checkCodeSpanLine('messageHistory: true');
cy.checkCodeSpanLine('validate: true');
cy.checkCodeSpanLine('nodePrefixId: test.nodePrefixId');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ exports[`CamelComponentSchemaService getVisualComponentSchema should build the a
},
"properties": {
"autoStartup": {
"default": "true",
"default": true,
"description": "Whether to auto start this route",
"title": "Auto Startup",
"type": "boolean",
Expand Down Expand Up @@ -136,7 +136,7 @@ exports[`CamelComponentSchemaService getVisualComponentSchema should build the a
"$ref": "#/definitions/org.apache.camel.model.InputTypeDefinition",
},
"logMask": {
"default": "false",
"default": false,
"description": "Whether security mask for Logging is enabled on this route.",
"title": "Log Mask",
"type": "boolean",
Expand Down

0 comments on commit e74521b

Please sign in to comment.