UserPreferences

PaceDecoupleCreateAndListEndpoints


Abstract

Replaces the 'href' attribute of 'app:collection' elements with two attributes: 'create' and 'list'. This allows for different IRIs for those two actions and, as a side-effect, discover whether you can create a member in the collection and/or list the collection membership.

Status

Open

Rationale

Endpoints for creating resources in collections and listing collection membership can have different IRIs (e.g. can use a third party gateway for creating resources, for example to cleanup entries –sanitize HTML/XHTML– and/or transform Textile/MarkDown to HTML/XHTML, or apply filters on POSTed images).

This Pace requires PaceRemoveListTemplate2 or similar to be adopted.

Proposal

Change section 7.3.3 to the following (keep subsections as-is unless told below):

7.3.3 The 'app:collection' element

The app:collection contains information elements that describe the location and capabilities of a collection.

appCollection =
   element app:collection {
      appCommonAttributes,
      attribute title { text },
      attribute create { text }?,
      attribute list { text }?,
      ( appMemberType
        & extensionElement* )
   }

Replace section 7.3.3.2 "The 'href' attribute" with the following two sections (renumber following sections):

7.3.3.2 The 'create' attribute

The app:collection element MAY contain an 'create' attribute, whose value conveys the IRI or the collection creation endpoint (see Section 8.1).

7.3.3.3 The 'list' attribute

The app:collection element MAY contain a 'list' attribute, whose value conveys the IRI or the collection listing endpoint (see Section 9).

Replace the first sentence of section 8.1 with the following:

Every collection creation endpoint accepts POST requests to create resources - the client POSTs a representation of the desired resource to the IRI of the collection creation endpoint.

Replace the first sentence of section 9 (as modified by PaceRemoveListTemplate2) with the following:

Every collection listing endpoint MUST provide representations or the collection resource in the form of Atom Feed documents when dereferencing the collection listing endpoint IRI.

Impacts

Notes

An app:collection element is useless without both @create and @list, but this Pace doesn't enforce the presence of one or the other (or both).


CategoryProposals