Closed digitalm8 closed 2 months ago
Cannot reproduce the error. This LAN interface was initially created on installation procedure. After editing the interface in the UI, everything started working.
This would be expected for the default LAN interface since it is created with the gateway field as an empty string instead of null. pfSense often treats null and empty values the same. But the REST API enforces a strict schema that does not treat these values the same. In the case of the gateway
field, it is nullable. Including {"gateway": null}
should nullify the empty string and allow the PATCH to go through.
Thank you very much for your reply. I will definitely take this into account when forming requests.
Describe the bug I've got the error while updating an assigned LAN interface.
Before update it looks like:
The response is:
Expected behavior I can create (POST) any LAN interface without gateway specified. But why API requires gateway on update (PATCH)?
pfSense Version & Package Version:
Affected Endpoints: PATCH /api/v2/interface