nodeSolidServer / nodeSolidServer/node-solid-server
NSS can't PATCH booleans represented as "true" or "false"
Open
@bourgeoa is already working on this.
Since Feb 13, 2023.
bug
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
Issue can be seen in action here (view the Network requests in your browser's DevTools): https://codesandbox.io/s/inruptsolid-client-js-sandbox-forked-xyvbg?file=/src/index.ts
GET https://vincent-test.inrupt.net/public/booleantest.ttl:
@prefix : <#>.
@prefix n0: <http://example.com/>.
:me n0:testbool true.
Alright, now let's try to turn that true to false:
PATCH to https://vincent-test.inrupt.net/public/booleantest.ttl with request body:
DELETE DATA {<https://vincent-test.inrupt.net/public/booleantest.ttl#me> <http://example.com/testbool> "true"^^<http://www.w3.org/2001/XMLSchema#boolean>.}; INSERT DATA {<https://vincent-test.inrupt.net/public/booleantest.ttl#me> <http://example.com/testbool> "false"^^<http://www.w3.org/2001/XMLSchema#boolean>.};
Response: 409 Conflict:
The patch could not be applied. Could not find to delete: <https://vincent-test.inrupt.net/public/booleantest.ttl#me> <http://example.com/testbool> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
Trying it again with this request body does work (i.e. "true" replaced by "1"):
DELETE DATA {<https://vincent-test.inrupt.net/public/booleantest.ttl#me> <http://example.com/testbool> "1"^^<http://www.w3.org/2001/XMLSchema#boolean>.}; INSERT DATA {<https://vincent-test.inrupt.net/public/booleantest.ttl#me> <http://example.com/testbool> "false"^^<http://www.w3.org/2001/XMLSchema#boolean>.};
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.