New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reactive-rest-data not compliant with openapi #25990
Comments
cc @Sgitario |
Dealing with parameterized types is a bit complex to do, though It's not technically impossible (see some examples). There is one open issue that will ease the generation of methods that return parameterized types: quarkusio/gizmo#70 Therefore, taking into account that this module is generating many methods, I would be in favor of adding the annotation |
exactly what I had in mind
we could do that, I don't mind |
Unfortunately, adding the annotation |
@Sgitario is the expectation that Smallrye OpenAPI treat a raw |
I would simply handle the case when a wrapper type is not a parameterized type ("Type.Kind.ParameterizedType"). Moreover, if the method is annotated with |
In addition to my previous comment, I think there is an issue in this line: https://github.com/smallrye/smallrye-open-api/blob/bce528abb3bfad9521524eb3d5d66e1cd8805e7c/core/src/main/java/io/smallrye/openapi/runtime/scanner/spi/AnnotationScanner.java#L366 According to comment, it should only pass when the annotation However, when I annotated my method with If the comment is correct, the right logic should be: if (apiResponses == null || JandexUtil.isEmpty(apiResponses)) { // I removed the exclamation Wdyt? |
Looks nice, can't wait at testing it, thanks for your reactivity guys!! |
This pull request will generate the rest data methods using the method signature that allows to use parameterized types. Fix quarkusio#25990
This pull request will generate the rest data methods using the method signature that allows to use parameterized types. Fix quarkusio#25990
This pull request will generate the rest data methods using the method signature that allows to use parameterized types. Fix quarkusio#25990 (cherry picked from commit ddc36e2)
Describe the bug
Adding quarkus-smallrye-openapi + quarkus-hibernate-reactive-rest-data-panache prevent the service to start
It looks like the generated methods return a
Uni.class
and not a parameterized typeUni<>
which fails open-api-core/AnnotationScanner
when checking forTypeUtil.unwrapType(returnType)
inisVoidResponse
.Can't we generate a parameterized Uni<Void/Object> method signature with gizmo ?
Expected behavior
Service should start and work with openapi
Actual behavior
How to Reproduce?
No response
Output of
uname -a
orver
Windows 11
Output of
java -version
17.0.2
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: