Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10698

camel-maven - validate simple expression predicate vs expression

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.19.0
    • Component/s: tooling
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When we get some details in the model we can find out if its a predicate or expression and use that in the validator to validate that correctly.

      Now it can fail with

      [INFO] --- camel-maven-plugin:2.19.0-SNAPSHOT:validate (default-cli) @ camel-example-spring-boot ---
      [INFO] Using Camel version: 2.19.0-SNAPSHOT
      [INFO] Endpoint validation success: (3 = passed, 0 = invalid, 0 = incapable, 0 = unknown components)
      [WARNING] Simple validation error at: org.apache.camel.example.spring.boot.MySpringBootRouter.configure(MySpringBootRouter.java:34)
      
      	Unexpected token ! at location 8
      	${body} !> 50
      	        *
      
      [WARNING] Simple validation error: (0 = passed, 1 = invalid)
      

      In a route with

              from("timer:trigger")
                  .filter().simple("${body} !> 50")
                      .to("log:out");
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              davsclaus Claus Ibsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: