Uploaded image for project: 'Juneau'
  1. Juneau
  2. JUNEAU-180

Incorrect Swagger on Spring Boot methods that return Collections of beans.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.1.3
    • 8.2.0
    • Code
    • None

    Description

      If your REST class is running in Spring Boot and it's annotated with @Secured, Spring Boot will create a proxied instance of the class using CGLIB which loses generic type information.  Therefore the schema information in the generated swagger for a method that returns something like the following will show up as just a collection of strings:

      @RestMethod
      public Collection<MyBean> getBeans() {...}

      Attachments

        Activity

          People

            jamesbognar James Bognar
            jamesbognar James Bognar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: