Swagger-annotations for multiple requestMappings on class level in Spring

Viewed 649

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!

1 Answers

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"})
Related