Java 如何避免类标记被方法标记覆盖?
使用Swagger 1.5.24并遵循以下步骤,我以这种方式编写了一个Swagger:Java 如何避免类标记被方法标记覆盖?,java,swagger,Java,Swagger,使用Swagger 1.5.24并遵循以下步骤,我以这种方式编写了一个Swagger: @Path("/path1") @Api(value = "Class for some requests", tags = {"Requests of type 1", "path1"}) public class Requests1 { @GET @Path("/request1") @ApiOperation(value = "Request 1 standard retrie
@Path("/path1")
@Api(value = "Class for some requests", tags = {"Requests of type 1", "path1"})
public class Requests1 {
@GET
@Path("/request1")
@ApiOperation(value = "Request 1 standard retriever", tags = {"standard", "version 1.0"})
public Response getRequest1(..) { ... }
@GET
@Path("/request1/specific")
@ApiOperation(value = "Request 1 specific retriever", tags = {"specific", "version 1.1"})
public Response getRequest1specific(..) { ... }
@POST
@Path("/request1")
@ApiOperation(value = "Request 1 standard inserter", tags = {"standard", "version 1.0"})
public Response insertRequest1(..) { ... }
@POST
@Path("/request1/specific")
@ApiOperation(value = "Request 1 specific inserter", tags = {"specific", "version 1.0"})
public Response insertRequest1specific(..) { ... }
}
我想要获得的是在类型1和path1的标记下列出类的所有方法,并在标记下列出标准、1.0版、特定的或1.1版指定了tose标记的方法
例如:
@Path("/path1")
@Api(value = "Class for some requests")
public class Requests1 {
@GET
@Path("/request1")
@ApiOperation(value = "Request 1 standard retriever", tags = {"Requests of type 1", "path1", "standard", "version 1.0"})
public Response getRequest1(..) { ... }
类型1的请求
- 请求1标准检索器
- 请求1个特定的检索器
- 请求1标准插入器
- 请求1个特定插入器
- 请求1个特定的检索器
- 请求2标准插入器
- 请求5
@Path("/path1")
@Api(value = "Class for some requests")
public class Requests1 {
@GET
@Path("/request1")
@ApiOperation(value = "Request 1 standard retriever", tags = {"Requests of type 1", "path1", "standard", "version 1.0"})
public Response getRequest1(..) { ... }