RubenVerborgh / solid-server-architecture

Proposed architecture for a Solid server
https://rubenverborgh.github.io/solid-server-architecture/solid-architecture-v1-3-0.pdf
13 stars 2 forks source link

update fields of Operation interface #38

Closed michielbdejong closed 4 years ago

michielbdejong commented 5 years ago

It now says:

+ requestBody : Representation?

Looking at https://github.com/RubenVerborgh/solid-server-ts/blob/master/src/http/ResourceStoreRequestHandler.ts#L120-L126, that instead should be:

+ body : Representation?
+ parsedBody : Representation?
michielbdejong commented 5 years ago

cc @jaxoncreed ^ the thing we talked about just now in regards to https://github.com/inrupt/solid-server-ts/issues/35#issuecomment-538376666

RubenVerborgh commented 5 years ago

parsedBody should likely be of more specific type; otherwise for its inclusion in addition to body.

michielbdejong commented 5 years ago

Is it still correct that Patch extends Representation as in https://github.com/inrupt/solid-server-ts/blob/master/src/ldp/IPatch.ts#L7? Because I think a sparql-update query is a representation of a patch, but a (parsed) patch object is not, right?

RubenVerborgh commented 5 years ago

Patch could either extend Representation or point to the representation. Access to the underlying body, even within a parsed object, remains important because some back-ends will need the original text. Take a application/sparql-update body: we need to parse it to determine required permissions, but if that back-end is (for instance) a SPARQL endpoint, it will take the original body rather than the parsed version.

jaxoncreed commented 5 years ago

Okay. I'll make it extend Representation then.

RubenVerborgh commented 4 years ago

Done in 3439fc93e8b31a9371d3b629c6fe989f49603cd4.