-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Register server exception mapper method of the Rest-Interface implementation class #36873
Register server exception mapper method of the Rest-Interface implementation class #36873
Conversation
Thanks for this. Can you add a test that covers the use case you have in mind? |
@geoand I added my test case to the PR |
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.
Thanks!
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
@geoand Could we select this for version 3.5.1 as well? |
I am a little hesitant to do that honestly. |
@geoand I totally understand. I am not sure if the current workaround (duplicate the I can only see the warning logs when starting the applications [WARNING] [io.smallrye.openapi.runtime.scanner.spi] SROAP07903: Duplicate operationId: getPortalByUrl produced by Class:
io.github.onecx.portal.rs.external.v1.controllers.PortalRestController, Method: jakarta.ws.rs.core.Response
getPortalByUrl(java.lang.String url) and Class: gen.io.github.onecx.portal.rs.external.v1.PortalV1Api, Method:
jakarta.ws.rs.core.Response getPortalByUrl(java.lang.String url) Do you see a problem with the workaround? |
It should be just fine |
@geoand thx, I'll stick with it and wait for |
👌🏼 |
Motivation:
We generate server endpoints for our Rest-Interfaces from openapi.yaml files. Generator generates interfaces, and we need to write only the implementation classes. We do have multiple versions (v1, v2, ...) of rest interface (multiple openapi.yaml files) in one application. We would like to have a custom server exception mapper for each version, which will create a valid response to the corresponding version.
Closes: #36872