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

camel-quarkus-openapi-java not marking required boolean properties if variable prefixed with is

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Information Provided
    • 3.14.1
    • None
    • camel-openapi-java, tooling
    • None
    • Oracle JDK 17, macOS 12.2.1, Quarkus 2.7.3, camel-quarkus-openapi-java 2.7.0, camel-openapi-java 3.14.1.

    • Unknown

    Description

      Boolean properties are not marked as required in the openapi document if the respective member variable name is prefixed with is.  The Fruit class in the attached project contains two boolean properties described below which are treated differently if the member variable name is prefixed.

      The property definition below doesn't appear as required in the openapi document although it's marked as required.  The expectation is that it would appear in the list of required properties.

      @NotBlank
      private boolean isNotWorking;

      public boolean isNotWorking()

      { return isNotWorking; }

      public void setNotWorking(boolean isNotWorking)

      { this.isNotWorking = isNotWorking; }

       

      The property definition below does appear as required in the openapi document as expected.

      @NotBlank
      private boolean working;

      public boolean isWorking()

      { return working; }

      public void setWorking(boolean working)

      { this.working = working; }

       

      Additionally, the text below is printed when viewing the openapi document.

      2022-03-08 11:38:20,704 WARN  [org.apa.cam.ope.RestModelConverters] (vert.x-worker-thread-0) Encountered unexpected type boolean in processing schema.

      Attachments

        1. camel-openapi-boolean-bug.zip
          387 kB
          M. Bergin

        Activity

          People

            davsclaus Claus Ibsen
            mbchangellc M. Bergin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: