Jornwer
Jornwer

Reputation: 1

Group controllers in same tag swagger

I have 2 controllers with different api versions but same swagger tag

@RequestMapping("/v1")
@Tag(name = "controller")
public class ControllerV1 {
    v1 GET/POST/PUT
}
@RequestMapping("/v2")
@Tag(name = "controller")
public class ControllerV2 {
    v2 GET/POST/PUT
}

Is there a way to group endpoints by controller in one tag but leaving order of http methods in each controller?

I want something like:

Upvotes: 0

Views: 1335

Answers (1)

Arthur Klezovich
Arthur Klezovich

Reputation: 2819

What you can do is make the version number a part of the tag like @Tag("v1/controller") This will achieve a nice grouping.

Upvotes: 1

Related Questions