there are a batch of statements to be written as follows (koa routing configuration), and the form is fixed as follows
router.get("/pattern", api.getPattern)
router.post("/pattern", api.setPattern)
router.get("/road", api.getRoad)
router.post("/road", api.setRoad)
......
if you want to generate this large number of statements quickly, how to deal with it