petrichory
petrichory

Reputation: 193

Swagger-annotations for multiple requestMappings on class level in Spring

I'm using io.swagger.annotations 1.5.6 to annotate my Rest services.

The problem is that we've defined several different options for the requestMapping on class level:

@Controller
@RequestMapping(value ={"/api", "/v1/api", "/api/br"})
Public class RestController {...}

Looking at the java docs for the @Api annotation it doesn't seem to be possible to use more than one value.

Is there a possibility to define several values to cover all the cases or can someone confirm that this is a feature that is not supported?

Thanks a lot in advance for having a look!

Upvotes: 2

Views: 970

Answers (1)

Atika R
Atika R

Reputation: 27

Have you tried using tags instead of value? tags property allows you to set multiple tags for the operations. For example:

@Api(tags = {"api","version1_api","br_api"})

Upvotes: 1

Related Questions