RFC Errata
RFC 8040, "RESTCONF Protocol", January 2017
Note: This RFC has been updated by RFC 8527
Source of RFC: netconf (ops)
Errata ID: 6342
Status: Rejected
Type: Technical
Publication Format(s) : TEXT
Reported By: Muly Ilan
Date Reported: 2020-11-22
Rejected by: Rob Wilton
Date Rejected: 2024-01-15
Section 4.6.1 says:
To replace just the "year" field in the "album" resource (instead of replacing the entire resource with the PUT method), the client might send a plain patch as follows: PATCH /restconf/data/example-jukebox:jukebox/\ library/artist=Foo%20Fighters/album=Wasting%20Light HTTP/1.1 Host: example.com If-Match: "b8389233a4c" Content-Type: application/yang-data+xml <album xmlns="http://example.com/ns/example-jukebox"> <year>2011</year> </album>
It should say:
To replace just the "year" field in the "album" resource (instead of replacing the entire resource with the PUT method), the client might send a plain patch as follows: PATCH /restconf/data/example-jukebox:jukebox/\ library/artist=Foo%20Fighters/album=Wasting%20Light HTTP/1.1 Host: example.com If-Match: "b8389233a4c" Content-Type: application/yang-data+xml <album xmlns="http://example.com/ns/example-jukebox"> <name>Wasting Light</name> <year>2011</year> </album>
Notes:
Missing key leaf value in the message-body (<name>Wasting Light</name>)
--VERIFIER NOTES--
As per this thread, https://mailarchive.ietf.org/arch/msg/netconf/ZlAQl3-YljG4tCDlrHP-PGb-KEY/ the consensus amongst the authors was that the RFC does not specify whether keys must be included in a YANG PATCH operation, and hence the default assumption is that they are not required.
It may be helpful for a a future revision of RESTCONF (or possibly YANG) to more explicitly state the required behaviour.