Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handlers to update and create resources with PUT #190

Open
tpluscode opened this issue Nov 5, 2024 · 0 comments
Open

Handlers to update and create resources with PUT #190

tpluscode opened this issue Nov 5, 2024 · 0 comments

Comments

@tpluscode
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant