@PutMapping("/{id}")
    @RequiresPermissions("system:api:edit")
    public ShenyuAdminResult updateApi(@PathVariable("id")
                                       @Existed(message = "api is not existed",
                                               provider = ApiMapper.class) final String id,
                                       @Valid @RequestBody final ApiDTO apiDTO) {
        apiDTO.setId(id);
        return ShenyuAdminResult.success(apiService.createOrUpdate(apiDTO));
    }
update api.

@param id     primary key.
@param apiDTO api.
@return {@linkplain ShenyuAdminResult}
shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/ApiController.java