Skip to content

Same operationId for overloaded methods using Groups breaks swagger-ui collapsibles #399

Closed
@stefan-huettemann

Description

@stefan-huettemann

Hi,

Problem

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions