question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PATCH on a non existing jsonld resource creates text/turtle contentType

See original GitHub issue

Environment

  • docker personal build with CSS recipes v5.0.0 with mashlib@1.8.4 and subdomain
  • node:alpine-lts

Description

  • Using PATCH N3 on a non existing resource : example.jsonld creates a text/turtle contentType. It should create a resource with application/ld+json contentType.

  • Using PATCH N3 on an existing resource example.jsonld with application/ld+json contentType the resource content is application/ld+json as expected.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
RubenVerborghcommented, Sep 21, 2022

Ack. I don’t think we should give external consumers of the HTTP interface access to the internals in any way. So if it MUST be JSON-LD on disk, then probably the client should first make a PUT of an empty JSON-LD document (and then it works with any extension).

This is part of a bigger conceptual issue, which is what representation is the target of a PATCH request. So if were to write a line-based diff patch that says “remove line 14” (not supported, but bear with me), then the server would need to know which representation it needs to alter.

0reactions
joachimvhcommented, Oct 7, 2022

Closed as answered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Content-Type MUST be used on all PUT/POST/PATCH ...
Clients requesting Content-Type: text/turtle from that resource don't get that, even though the content of the file is structured as Turtle.
Read more >
LdpResourceService | SemApps
Full update of an existing resource · If some predicates existed but are not provided, they will be deleted. · Content-type can be...
Read more >
JSON-LD 1.1 Processing Algorithms and API - W3C
This specification defines a set of algorithms for programmatic transformations of JSON-LD documents. Restructuring data according to the ...
Read more >
RESTful HTTP API - Confluence Mobile - LYRASIS Wiki
Overview. Introduction. The Fedora 4 HTTP API is generally a RESTful API. HTTP methods like GET, PUT, POST and DELETE are implemented on...
Read more >
LDP-CoAP Mapping - SWoT
Allow, Accept-Post, Accept-Patch, Not defined in CoAP, available in JSON ... example.org Accept: text/turtle HTTP/1.1 200 OK Content-Type: text/turtle; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found