You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a Collection<? extends Enum<?>> is used as a parameter in a repository method, the generated schema is a generic array of objects instead of a array of enum strings.
An example of how it would be used is for an IN query, like this example repository (full repro at ParkerM@42d3dbd):
The generated path parameters schema does not contain type info for the enum schema.
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?
Tested with 2.7.6 and the current version in master (2.7.5)
What modules and versions of springdoc-openapi are you using? springdoc-openapi-data-rest and springdoc-openapi-ui 1.6.13 (as well as current master)
What is the actual and the expected result using OpenAPI Description (yml or json)?
The actual result for a scalar Enum parameter is correct, but the type info is missing for array values.
Schema for parameters such as @Param("myEnums") List<MyEnum> in RepositoryRestResource methods should be recognized as an array of enum strings by default.
Screenshots
The expected dropdown in swagger-ui:
What it looks like without the enum type info. Note that manually inputting string objects ends up adding quotes to the query, so sadly it cannot be used as a workaround:
The text was updated successfully, but these errors were encountered:
Describe the bug
When a
Collection<? extends Enum<?>>
is used as a parameter in a repository method, the generated schema is a generic array of objects instead of a array of enum strings.An example of how it would be used is for an
IN
query, like this example repository (full repro at ParkerM@42d3dbd):The generated path parameters schema does not contain type info for the enum schema.
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?
Tested with 2.7.6 and the current version in master (2.7.5)
What modules and versions of springdoc-openapi are you using?
springdoc-openapi-data-rest
andspringdoc-openapi-ui
1.6.13 (as well as current master)What is the actual and the expected result using OpenAPI Description (yml or json)?
The actual result for a scalar Enum parameter is correct, but the type info is missing for array values.
Failing test case here that uses
@RepositoryRestResource
: Add failing test case for enum collection parameter issue #2001 #2002Expected behavior
Schema for parameters such as
@Param("myEnums") List<MyEnum>
in RepositoryRestResource methods should be recognized as an array of enum strings by default.Screenshots

The expected dropdown in swagger-ui:
What it looks like without the enum type info. Note that manually inputting string objects ends up adding quotes to the query, so sadly it cannot be used as a workaround:

The text was updated successfully, but these errors were encountered: