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

camel-openapi-java - A response type containing an array generates incorrect schema reference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.0
    • 4.0.1, 4.1.0
    • camel-openapi-java
    • None
    • Unknown

    Description

      When the Camel rest DSL contains the following 

      .get("/findAll").description("Find all users").outType(User[].class)
      

      the generated OpenAPI contains a schema reference containing the fully qualified type name instead of the class name (Users), as shown here:

      "schema":{
       "type":"array",
       "items":{"$ref":"#/components/schemas/org.apache.camel.openapi.User"}
       }
      

      This only occurs when outType is an array.

       

      Attachments

        Issue Links

          Activity

            People

              klease78 Karen Lease
              klease78 Karen Lease
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: