You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the operationId is used in swagger to define the collapsibles (doc-expansion).
With overloaded methods like, e.g.:
public ResponseEntity<?> get(String a) {...}
public ResponseEntity<?> get(String a, Object b) {...}
both services have the same operationId attribute (here: operationId: "get")
This breaks the swagger-ui doc-expansion functionality.
Workaround
Setting a unique operationId in @Operation annotation resolves the problem, but .. I would still consider the behavior a bug (probably with an easy solution).
Solution
I couldn't find the issue by reading the code to provide a solution. There seems to be some code to avoid conflicts in operationIds but ... it should be easy to reproduce the problem (and probably fix it by using a unique id; maybe a UUID would help?).
Thanks.
Regards,
-Stefan
The text was updated successfully, but these errors were encountered:
You need to specify that this issue happens while using Groups.
I confirm its reproducible and will be fixed for the next release.
bnasslahsen
changed the title
Same operationId for overloaded methods breaks swagger-ui collapsibles
Same operationId for overloaded methods using Groups breaks swagger-ui collapsibles
Feb 2, 2020
Hi,
Problem
the
operationId
is used in swagger to define the collapsibles (doc-expansion).With overloaded methods like, e.g.:
both services have the same
operationId
attribute (here:operationId: "get"
)This breaks the swagger-ui doc-expansion functionality.
Workaround
Setting a unique
operationId
in@Operation
annotation resolves the problem, but .. I would still consider the behavior a bug (probably with an easy solution).Solution
I couldn't find the issue by reading the code to provide a solution. There seems to be some code to avoid conflicts in operationIds but ... it should be easy to reproduce the problem (and probably fix it by using a unique id; maybe a UUID would help?).
Thanks.
Regards,
-Stefan
The text was updated successfully, but these errors were encountered: