Used for handling cases where an API has multiple available paths.
Currently available strategies (case insensitive):
Available Strategy | Strategy Description |
---|---|
FIRST | Choose the first available path |
LAST | Choose the last available path |
LONGEST | Choose the longest available path |
SHORTEST | Choose the shortest available path |
ALL | Generate an API for every available path |
Possible configurations are as follows:
path.multi=first
path.multi=last
path.multi=longest
path.multi=shortest
path.multi=all
The API can also decide the selection strategy itself
path.multi=#multi
Usage is as follows:
/**
* Some Mock related APIs
*/
@RestController
@RequestMapping(value = "mock")
public class MockCtrl {
/**
* @multi all
*/
@GetMapping(value = {"/string", "string2"})
public String mockString() {
return Result.success("mock string");
}
}