Skip to content

DELETE operation - #70

Open
namedgraph wants to merge 1 commit into
mainfrom
delete-op
Open

namedgraph wants to merge 1 commit into
mainfrom
delete-op

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Adds DELETE(url: URI) → Result, following the conventions of POST/PUT/PATCH.

  • Spec (formal-semantics.md): a §4.4 entry; DELETE added to the update effects (§3.6), the write row of the error table (§3.7) and the upper-case HTTP method names (§4). §5 notes that REST-VKG does not implement it yet.
  • Behaviour: as the Graph Store Protocol's DELETE. It goes through the client's conditional write path (HEAD → If-Match). It returns the one-row status/url result, with url being the URI removed. Any non-2xx answer is a ValueError, 404 for a missing document included; there is no if_absent. It counts as a write to its URI for the ForEach same-target rule. Kind: destructive.
  • Guide: a ## DELETE(url: URI) → Result section with an example, which the guide tests run.
  • Tests: DELETE joins the shared write contract (test_write_contract.py). New tests/unit/test_delete.py covers the type errors, the 404, the JSON arguments and the ForEach cases. The name and kind tests include it. tests/test_client_writes.py is removed: it existed because no operation sent a DELETE, and the write contract now covers its If-Match check.
  • CHANGELOG.md: a new 2.0.4 - Unreleased section. README.md: DELETE added to the operation list.

ruff check and the offline suite pass (1154 passed, 7 skipped). Not run yet:

  • -m ldh against a LinkedDataHub, to see its answer to DELETE (e.g. on a container with children).
  • The REST-VKG counterpart.

🤖 Generated with Claude Code

As the Graph Store Protocol's DELETE, sent conditionally with If-Match like
every other write. Returns the one-row status/url result; a non-2xx answer
(404 for a missing document) is an error, and a DELETE counts as a write to
its URI for an enclosing ForEach. Destructive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant