Setting

path.multi

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:

  1. Choose the first available path
path.multi=first
  1. Choose the last available path
path.multi=last
  1. Choose the longest available path
path.multi=longest
  1. Choose the shortest available path
path.multi=shortest
  1. Generate an API for every available path
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");
    }
}