Available on crate feature
transport only.Expand description
PATCH: JSON Merge Patch with the two rules OCPI adds on top.
A PATCH request must only specify the object’s identifier (if needed to identify this object) and the fields to be updated. Any fields (both required or optional) that are left out remain unchanged.
That is RFC 7396 JSON Merge Patch, plus:
last_updatedis required in every PATCH — a patch without it isStatusCode::INVALID_PARAMETERS, the spec’s own example of what 2001 means.- The result must still be a valid object, so a patch that nulls a required field is refused rather than applied.
Spec: 2.3.0 §transport_and_format_patch, §status_codes_2xxx_client_errors
Structs§
- Patch
- A partial update to an OCPI object.
Enums§
- Patch
Fallback - What a client should do after a PATCH that the peer refused.
Functions§
- merge
- Applies an RFC 7396 JSON Merge Patch in place.
- patch_
fallback - Decides the fallback for a failed PATCH from the error the peer returned.