-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
adding support for @ResponseStatus annotation into spring-http-interface java spring generator #20071
base: master
Are you sure you want to change the base?
adding support for @ResponseStatus annotation into spring-http-interface java spring generator #20071
Conversation
@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann ) @Zomzog @lwlee2608 @martin-mfg could anybody review and approve. We need this feature ASAP. Thanks. |
Is it possible to push this change into 7.10 milestone so we can have the feature before the year 2025? |
thanks for the PR. can we include samples using this option and test it in the CI workflow? a good starting is to copy
then add the new sample folder to the workflow: .github/workflows/samples-jdk17.yaml |
additional changes to samples jdk17
@wing328 Thanks for your comment. I've pushed couple extra commits per your request. Please let me know if they look fine. Also, should I generate the samples manually and commit them into the repo? I'm not very familiar with Github workflows and how they are used for testing the openapi-generator. So I need some more guidance on that. |
can you please commit the samples as well so that the CI can test these? |
@wing328 The samples were added. |
https://github.com/OpenAPITools/openapi-generator/actions/runs/11790584074/job/32930532262?pr=20071 can you please update the samples to fix the CI failure? |
@@ -26,7 +26,7 @@ paths: | |||
requestBody: | |||
$ref: "#/components/requestBodies/Pet" | |||
responses: | |||
"200": | |||
"201": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to make any changes in this file? If not, could you revert them please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to use correct statuses for POST/PUT success responses. Gonna revert then.
- samples/client/petstore/java/webclient-jakarta | ||
- samples/client/petstore/java/microprofile-rest-client-outer-enum | ||
# servers | ||
- samples/openapi3/server/petstore/springboot-3 | ||
- samples/server/petstore/java-camel/ | ||
- samples/server/petstore/java-helidon-server/v3/mp/ | ||
- samples/server/petstore/java-helidon-server/v3/se | ||
- samples/client/petstore/spring-http-interface-reactive | ||
- samples/client/petstore/spring-http-interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason to remove these tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are duplicated. Same paths are already present in the #clients section. Probably copy/paste issue.
Spring-http-interface generator is missing the support for useResponseEntity option for adding @ResponseStatus annotation similar to Java Spring generator. This feature was probably omitted due to the fact that the HTTP interface is mainly used for client side implementations. But there are cases when it also can be used for server side implementations like for example a REST controller which plays a role of a server side implementation thus other micro-services can use the same HTTP interface to make calls to the server-side endpoints utilizing same API. See https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface.
The change should be made in api.mustache template.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)