Skip to content

Handlers to update and create resources with PUT #190

@tpluscode

Description

@tpluscode

We need some built-in ways to support updating resources. We should consider how updating a resource complement that resource's GET handler.

UC 1: PUT to update existing resource using kl:OwnGraphLoader

kl:OwnGraphLoader is the default, which should make it easy to handle updates. There is exactly one graph for a resource and a reusable handler would just replace its contents with the request payload.

UC 2: PUT to update existing resource using other loader

It could be kl:DescribeLoader but also any other, where the resource can be spread across multiple graphs. There can also be two possible variants to this scenario:

  • multiple graphs for a single resource, for example partitioned by predicates or with some predicates ignored from payload
  • some graphs shared between multiple resource: TBD

UC 3: PUT to create a new resource

Given a PUT request to a resource which does not exist we can allow it to be created if:

  1. we can find exactly one Resource Shape
  2. that resource shape explicitly allows resources to be PUT (for example using a new term kl:createWithPUT true
  3. loader is kopflos:OwnGraphLoader or it clearly defines how the triples are stored

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions