ETag and Last-Modified should be part of the response payload maintained
on RestconfServer side. Add FIXMEs to reflect that.
JIRA: NETCONF-773
Change-Id: Ice8369fb6545569477a137079691c79e55f32927
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yield Response.status(Status.OK)
.entity(result)
// FIXME: is this ETag okay?
+ // FIXME: use tag() method instead
.header("ETag", '"' + type.getModule().getRevision().map(Revision::toString).orElse(null)
+ "-" + type.getLocalName() + '"')
+ // FIXME: use lastModified() method instead
.header("Last-Modified", FORMATTER.format(LocalDateTime.now(Clock.systemUTC())))
.build();
}
* An implementation of a RESTCONF server, implementing the
* <a href="https://www.rfc-editor.org/rfc/rfc8040#section-3.3">RESTCONF API Resource</a>.
*/
+// FIXME: configuration datastore should maintain ETag and Last-Modified headers, so that these can be returned when
+// GET/PATCH/POST/PUT modify the data.
+// FIXME: NETCONF-773: as a first step in doing that we should carry those fields in our responses
@NonNullByDefault
public interface RestconfServer {
/**