suslovsergey opened a new issue #6085:
URL: https://github.com/apache/apisix/issues/6085
### Issue description
Hello, team!
At the moment I am developing a provider for terraform, and it confuses me
that there is no method that would update the entire route object. IMHO it is
very inconvenient to calculate changes on the provider side. And here's the
question: if I will use the `PUT /apisix/admin/routes/{id}` method to update
the route - what could be the side effect of this approach? is there a
possibility that the route that I am updating will start giving 404 for a short
time?
On dev VM i add some code for patch method in routes.lua:
``` lua
...
if sub_path and sub_path ~= "" then
if sub_path == "__full__" then
node_value = conf
else
local code, err, node_val = core.table.patch(node_value,
sub_path, conf)
node_value = node_val
if code then
return code, err
end
end
...
```
### Environment
- apisix version (cmd: `apisix version`): 2.11.0
- OS (cmd: `uname -a`): centOS7
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
openresty/1.19.9.1
- etcd version, if have (cmd: run `curl
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
- apisix-dashboard version, if have:
- the plugin runner version, if the issue is about a plugin runner (cmd:
depended on the kind of runner):
- luarocks version, if the issue is about installation (cmd: `luarocks
--version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]