Update commands should only update what is set to change
Even if the REST API does not support partial updates (PATCH
), the comand line client should allow one to do partial updates (it can get the actual record and update it).
For example :
$ waarp-gateway [...] server update sftp_iface
json: error calling MarshalJSON for type json.RawMessage: unexpected end of JSON input
Should not return an error, but print nothing to do
.
$ waarp-gateway [...] server update sftp_iface -c '{"address":"0.0.0.0","port":2222}'
unknown protocol
should update only the config and not the protocol.
Actually, there is an inconsistency between arguments verification and the outcome: if an argument is optional, there should be no error when it is omitted.