You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (Jira)" <ji...@apache.org> on 2020/01/20 19:27:00 UTC
[jira] [Closed] (JUNEAU-180) Incorrect Swagger on Spring Boot
methods that return Collections of beans.
[ https://issues.apache.org/jira/browse/JUNEAU-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Bognar closed JUNEAU-180.
-------------------------------
Fix Version/s: 8.1.4
Resolution: Fixed
> Incorrect Swagger on Spring Boot methods that return Collections of beans.
> --------------------------------------------------------------------------
>
> Key: JUNEAU-180
> URL: https://issues.apache.org/jira/browse/JUNEAU-180
> Project: Juneau
> Issue Type: Improvement
> Components: Code
> Affects Versions: 8.1.3
> Reporter: James Bognar
> Assignee: James Bognar
> Priority: Major
> Fix For: 8.1.4
>
>
> 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() \{...}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)