From e41dcf7f823d2a4ab8707257347a66eadd81107a Mon Sep 17 00:00:00 2001 From: "Wouter Termont (imec)" Date: Mon, 29 Jun 2026 11:08:24 +0000 Subject: [PATCH 1/7] nitpicks about linkset metadata --- lws10-core/Operations/metadata.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lws10-core/Operations/metadata.md b/lws10-core/Operations/metadata.md index 917b476..b515dfd 100644 --- a/lws10-core/Operations/metadata.md +++ b/lws10-core/Operations/metadata.md @@ -9,12 +9,11 @@ All metadata in LWS is expressed as a set of typed links originating from a reso Metadata distinguishes between resources and their representations, allowing for multiple media types where applicable. For data resources, metadata includes representations, each with mediaType and optional sizeInBytes. For containers and data resources we consider the link to its parent container resource to be part of the metadata of the resource. - **The Linkset Resource** -For each resource in storage, a server MUST make metadata links available as a standalone resource according to [[!RFC9264]]. +For each resource in storage, a server MUST make metadata links available as a linkset, according to [[!RFC9264]]. - Discovery: A resource's linkset is discoverable via a Link header with the relation `rel="linkset"`. - Media Type: A linkset resource MUST be available as `application/linkset+json`. -- Integrity: The 'linkset' link MUST point to a server-managed resource. Updates to the linkset MUST be atomic with associated resource operations to maintain consistency. +- Integrity: The 'linkset' link MUST point to an LWS resource in the same storage. Updates to the linkset MUST be atomic with associated resource operations to maintain consistency. **Discovering Metadata** Clients discover metadata primarily through Link headers in response to GET or HEAD requests. From 99d247dc4b3c0eca9e06d9ea47b26e74dbea1fb0 Mon Sep 17 00:00:00 2001 From: "Wouter Termont (imec)" Date: Mon, 29 Jun 2026 11:15:01 +0000 Subject: [PATCH 2/7] add profile parameter to create responses --- lws10-core/Operations/create-resource.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lws10-core/Operations/create-resource.md b/lws10-core/Operations/create-resource.md index 07fdb8c..e860301 100644 --- a/lws10-core/Operations/create-resource.md +++ b/lws10-core/Operations/create-resource.md @@ -23,7 +23,7 @@ The **create resource** operation adds a new [served resource](#dfn-served-resou New resources are created using POST to a target container URI, with the server assigning the final identifier. Clients MAY suggest a name via the `Slug` header. Clients MAY provide initial user-managed metadata for the new resource by including one or more `Link` headers in the POST request, following the syntax of Web Linking in [[RFC8288]]. Server-managed metadata MUST be generated automatically by the server upon creation and MUST NOT be overridden by client-provided links. -On success, the server MUST return the 201 status code with the new URI in the `Location` header. The server MUST include `Link` headers for key server-managed metadata, including a link to the parent container (`rel="up"`), and a link to the created resource's dedicated linkset resource (`rel="linkset"; type="application/linkset+json"`). Additional links SHOULD include `rel="type"` (indicating `https://www.w3.org/ns/lws#Container` or `https://www.w3.org/ns/lws#DataResource`). The body MAY be empty or include a minimal representation of the resource. All metadata creation and linking MUST be atomic with the resource creation to maintain consistency. +On success, the server MUST return the 201 status code with the new URI in the `Location` header. The server MUST include `Link` headers for key server-managed metadata, including a link to the parent container (`rel="up"`), and a link to the created resource's dedicated linkset resource (`rel="linkset"; type="application/linkset+json"; profile="lws-meta"`). Additional links SHOULD include `rel="type"` (indicating `https://www.w3.org/ns/lws#Container` or `https://www.w3.org/ns/lws#DataResource`). The body MAY be empty or include a minimal representation of the resource. All metadata creation and linking MUST be atomic with the resource creation to maintain consistency. **POST (to a container URI)** – *Create with server-assigned name:* Use POST to add a new resource inside an existing container. The server assigns an identifier to the resource, optionally suggested via the `Slug` header. The server MAY honor the Slug header if it does not conflict with naming rules or existing resources. Clients indicate the type of resource to create as follows: @@ -54,7 +54,7 @@ In this example, the client is posting to the container `/alice/notes/`. HTTP/1.1 201 Created Location: /alice/notes/shoppinglist.txt Content-Type: text/plain; charset=UTF-8 -Link: ; rel="linkset"; type="application/linkset+json" +Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta"" Link: ; rel="up" Link: ; rel="type" Content-Length: 0 @@ -76,7 +76,7 @@ Link: ; rel="type" ``` HTTP/1.1 201 Created Location: /alice/notes/ -Link: ; rel="linkset"; type="application/linkset+json" +Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta"" Link: ; rel="up" Link: ; rel="type" Content-Length: 0 From d23ed65e0da1b9e2e22b555ae8d245b6efe9c6ce Mon Sep 17 00:00:00 2001 From: "Wouter Termont (imec)" Date: Mon, 29 Jun 2026 11:15:52 +0000 Subject: [PATCH 3/7] add profile parameter to read responses --- lws10-core/Operations/read-resource.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lws10-core/Operations/read-resource.md b/lws10-core/Operations/read-resource.md index df63c44..b3b8d4d 100644 --- a/lws10-core/Operations/read-resource.md +++ b/lws10-core/Operations/read-resource.md @@ -23,7 +23,7 @@ HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 34 ETag: "abc123456" -Link: ; rel="linkset"; type="application/linkset+json" +Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta" Link: ; rel="up" Link: ; rel="type" @@ -52,7 +52,7 @@ Assuming the container exists and the client has access: HTTP/1.1 200 OK Content-Type: application/lws+json ETag: "container-etag-789" -Link: ; rel="linkset"; type="application/linkset+json" +Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta" Link: ; rel="up" Link: ; rel="type" From 8517d62e6897f926a2f52e06441fff773d0d3b52 Mon Sep 17 00:00:00 2001 From: "Wouter Termont (imec)" Date: Mon, 29 Jun 2026 11:16:27 +0000 Subject: [PATCH 4/7] fix typo --- lws10-core/Operations/create-resource.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lws10-core/Operations/create-resource.md b/lws10-core/Operations/create-resource.md index e860301..c212042 100644 --- a/lws10-core/Operations/create-resource.md +++ b/lws10-core/Operations/create-resource.md @@ -54,7 +54,7 @@ In this example, the client is posting to the container `/alice/notes/`. HTTP/1.1 201 Created Location: /alice/notes/shoppinglist.txt Content-Type: text/plain; charset=UTF-8 -Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta"" +Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta" Link: ; rel="up" Link: ; rel="type" Content-Length: 0 @@ -76,7 +76,7 @@ Link: ; rel="type" ``` HTTP/1.1 201 Created Location: /alice/notes/ -Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta"" +Link: ; rel="linkset"; type="application/linkset+json; profile="lws-meta" Link: ; rel="up" Link: ; rel="type" Content-Length: 0 From ad3928c3cadeb3ab6cc163d301919e4592762b7d Mon Sep 17 00:00:00 2001 From: "Wouter Termont (imec)" Date: Mon, 29 Jun 2026 11:21:37 +0000 Subject: [PATCH 5/7] add profile parameter to update types --- lws10-core/Operations/update-resource.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lws10-core/Operations/update-resource.md b/lws10-core/Operations/update-resource.md index 0209afc..82d2825 100644 --- a/lws10-core/Operations/update-resource.md +++ b/lws10-core/Operations/update-resource.md @@ -54,9 +54,9 @@ A client first fetches the linkset and receives its ETag. ``` GET /alice/personalinfo.json.meta HTTP/1.1 Authorization: Bearer -Accept: application/linkset+json +Accept: application/linkset+json; profile="lws-meta" HTTP/1.1 200 OK -Content-Type: application/linkset+json +Content-Type: application/linkset+json; profile="lws-meta" ETag: "meta-v1" { "linkset": [ @@ -71,7 +71,7 @@ The client now wants to add a license. It constructs a new, complete linkset doc ``` PUT /alice/personalinfo.json.meta HTTP/1.1 Authorization: Bearer -Content-Type: application/linkset+json +Content-Type: application/linkset+json; profile="lws-meta" If-Match: "meta-v1" { "linkset": [ @@ -92,4 +92,4 @@ ETag: "meta-v2" **Summary of Update Rules** If you want to change only the content of a resource → PUT/PATCH the resource itself. If you want to change only the links (metadata) of a resource → PUT/PATCH the resource’s associated linkset resource. -If you want to change both content and links → PUT/PATCH the resource itself, including the appropriate Link headers AND 'Prefer: set-linkset'. Setting both is off by default. \ No newline at end of file +If you want to change both content and links → PUT/PATCH the resource itself, including the appropriate Link headers AND 'Prefer: set-linkset'. Setting both is off by default. From 5631f200dc1b5353bb45d23669f7ab17fea5a269 Mon Sep 17 00:00:00 2001 From: "Wouter Termont (imec)" Date: Mon, 29 Jun 2026 11:24:08 +0000 Subject: [PATCH 6/7] add profile param to pagination examples --- lws10-core/lws-media-type.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lws10-core/lws-media-type.md b/lws10-core/lws-media-type.md index 07981df..a425a63 100644 --- a/lws10-core/lws-media-type.md +++ b/lws10-core/lws-media-type.md @@ -67,7 +67,7 @@ Response (first page): HTTP/1.1 200 OK Content-Type: application/lws+json ETag: "photos-page1-etag" -Link: ; rel="linkset"; type="application/linkset+json" +Link: ; rel="linkset"; type="application/linkset+json"; profile="lws-meta" Link: ; rel="up" Link: ; rel="acl" Link: ; rel="type" @@ -111,7 +111,7 @@ Response (middle page): HTTP/1.1 200 OK Content-Type: application/lws+json ETag: "photos-page2-etag" -Link: ; rel="linkset"; type="application/linkset+json" +Link: ; rel="linkset"; type="application/linkset+json"; profile="lws-meta" Link: ; rel="up" Link: ; rel="acl" Link: ; rel="type" From 286c4a928815f60f6f7df471c7fd432b1bf4f0d3 Mon Sep 17 00:00:00 2001 From: "Wouter Termont (imec)" Date: Mon, 29 Jun 2026 11:30:12 +0000 Subject: [PATCH 7/7] add motivation for profile parameter --- lws10-core/Operations/metadata.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lws10-core/Operations/metadata.md b/lws10-core/Operations/metadata.md index b515dfd..2db685c 100644 --- a/lws10-core/Operations/metadata.md +++ b/lws10-core/Operations/metadata.md @@ -12,7 +12,7 @@ Metadata distinguishes between resources and their representations, allowing for **The Linkset Resource** For each resource in storage, a server MUST make metadata links available as a linkset, according to [[!RFC9264]]. - Discovery: A resource's linkset is discoverable via a Link header with the relation `rel="linkset"`. -- Media Type: A linkset resource MUST be available as `application/linkset+json`. +- Media Type: A linkset resource MUST be available as `application/linkset+json; profile="lws-meta"`. The `lws-meta` profile allows the server to distinguish between linksets as auxiliary resource and linksets as data resource. - Integrity: The 'linkset' link MUST point to an LWS resource in the same storage. Updates to the linkset MUST be atomic with associated resource operations to maintain consistency. **Discovering Metadata**