Quarkus + Resteasy + Google Cloud Functions: no query parameters bypass
See original GitHub issueDescribe the bug
I’m trying to implement a simple service using Google Cloud Functions and Quarkus. But if I’m trying to use @QueryParam
annotation I’m getting nulls in any param. E.G.:
@GET
@Path("echo1")
@Produces(MediaType.TEXT_PLAIN)
public Response echo1(@QueryParam("test") String test) {
return Response.status(Response.Status.OK)
.encoding("UTF-8")
.entity("test: " + test).build();
}
Expected behavior
test: test string
Actual behavior
test: null
To Reproduce I’ve implemented a very small test service to reproduce the issue: https://github.com/HardNorth/quarkus-google-functions-test/blob/main/src/main/java/net/hardnorth/test/quarkus/QuarkusTestService.java
You need to deploy it into Google Cloud. Because it works locally.
Configuration Doesn’t matter at all
Additional context
Based on what I see from code there is a missing part in QuarkusHttpFunction.java
. E.G. for Amazon lambdas you have a whole loop which appends query parameters to path
variable:
https://github.com/quarkusio/quarkus/blob/master/extensions/amazon-lambda-rest/runtime/src/main/java/io/quarkus/amazon/lambda/http/LambdaHttpHandler.java#L154
But there is no such logic for Google Functions: https://github.com/quarkusio/quarkus/blob/master/extensions/google-cloud-functions-http/runtime/src/main/java/io/quarkus/gcp/functions/http/QuarkusHttpFunction.java#L94
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (10 by maintainers)
@HardNorth have you seen https://github.com/quarkusio/quarkus/blob/master/CONTRIBUTING.md#build ? That might help.
@loicmathieu @gsmet Posted a pull-request: https://github.com/quarkusio/quarkus/pull/15620