Skip to content

[jaxrs-spec][quarkus] fix cookie in param #21400

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

a86rbchn
Copy link
Contributor

CookieParams is not presented in src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiInterface.mustache

Closes #21375

@wing328
Copy link
Member

wing328 commented Jun 10, 2025

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@a86rbchn a86rbchn force-pushed the quarkus-fix-cookie branch 2 times, most recently from 9c6ab93 to 43c65de Compare June 10, 2025 19:30
@a86rbchn
Copy link
Contributor Author

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

It seems ok now

@a86rbchn a86rbchn force-pushed the quarkus-fix-cookie branch from 43c65de to eb66e67 Compare June 11, 2025 12:51
@wing328
Copy link
Member

wing328 commented Jun 12, 2025

cc
@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @martin-mfg (2023/08)

@wing328
Copy link
Member

wing328 commented Jun 12, 2025

tested with a spec with cookie parameters to confirm the fix

diff --git a/src/gen/java/org/openapitools/api/PetsApi.java b/src/gen/java/org/openapitools/api/PetsApi.java
index 4b806e6..205e5f1 100644
--- a/src/gen/java/org/openapitools/api/PetsApi.java
+++ b/src/gen/java/org/openapitools/api/PetsApi.java
@@ -17,7 +17,7 @@ import javax.validation.Valid;
 */
 @Path("/pets")
 @Api(description = "the pets API")
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", date = "2025-06-12T18:26:59.266514400+08:00[Asia/Hong_Kong]", comments = "Generator version: 7.14.0-SNAPSHOT")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", date = "2025-06-12T18:28:06.906993300+08:00[Asia/Hong_Kong]", comments = "Generator version: 7.14.0-SNAPSHOT")
 public class PetsApi {

     @GET
@@ -25,7 +25,7 @@ public class PetsApi {
     @ApiResponses(value = {
         @ApiResponse(code = 200, message = "OK", response = Void.class)
     })
-    public Response getCustomer(@HeaderParam("first")   String first,@CookieParam("cookieParameter")   String cookieParameter) {
+    public Response getCustomer(@HeaderParam("first")   String first) {
         return Response.ok().entity("magic!").build();
     }
 }

output compiles without issues

[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ openapi-jaxrs-server ---
[INFO] skip non existing resourceDirectory C:\Users\wing3\AppData\Local\Temp\cookie\src\test\resources
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ openapi-jaxrs-server ---
[INFO] No sources to compile
[INFO]
[INFO] --- surefire:3.1.2:test (default-test) @ openapi-jaxrs-server ---
[INFO] No tests to run.
[INFO]
[INFO] --- war:3.1.0:war (default-war) @ openapi-jaxrs-server ---
[INFO] Packaging webapp
[INFO] Assembling webapp [openapi-jaxrs-server] in [C:\Users\wing3\AppData\Local\Temp\cookie\target\openapi-jaxrs-server-2.0.0]
[INFO] Processing war project
[INFO] Webapp assembled in [124 msecs]
[INFO] Building war: C:\Users\wing3\AppData\Local\Temp\cookie\target\openapi-jaxrs-server-2.0.0.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.011 s
[INFO] Finished at: 2025-06-12T18:27:10+08:00

@wing328 wing328 merged commit 937d314 into OpenAPITools:master Jun 12, 2025
10 checks passed
@a86rbchn a86rbchn deleted the quarkus-fix-cookie branch June 18, 2025 10:24
@wing328 wing328 added this to the 7.14.0 milestone Jun 19, 2025
@wing328 wing328 changed the title fix: [issue #21375][jaxrs-spec][quarkus] fix cookie in param [jaxrs-spec][quarkus] fix cookie in param Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants