配置

api.open

可用上下文it为: method

标记接口是否公开

demo

配置如下:

api.open=#open

使用如下:

/**
* Mock Apis
*/
@RestController
@RequestMapping(value = "mock")
public class MockCtrl {

    /**
    * Mock String
    * @open
    */
    @ApiOperation(value = "mock string", opens = {"swagger", "test"})
    @GetMapping("/string")
    public String mockString() {
        return Result.success("mock string");
    }

}