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

camel-core - Java fluent builder for expression can allow to use enum class directly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.5.0
    • camel-core
    • None
    • Unknown

    Description

      See this class JsonPathSplitSingleListOptionTest (https://github.com/apache/camel/pull/13364)

      var jsonpath = expression().jsonpath().option(Option.ALWAYS_RETURN_LIST.name()).expression("$.store.book[0]").end();

      The option is an enum from camel-jsonpath, but the DSL method accepts only a String. It would be nice if we could somehow pass in just the enum field, without having to call .name(), ala:

      var jsonpath = expression().jsonpath().option(Option.ALWAYS_RETURN_LIST).expression("$.store.book[0]").end();

      So we have both a String and an enum field method in the generated fluent builder.

      Attachments

        Issue Links

          Activity

            People

              nfilotto Nicolas Filotto
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: