OADA / oada-cache

2 stars 0 forks source link

'The path does not exist on the given tree' for delete to path deeper than given tree. #18

Open sanoel opened 4 years ago

sanoel commented 4 years ago

I believe it ought to accept the tree and use the content type of the deepest known resource. E.g., connection.delete({ path: '/bookmarks/a/b/c', tree: { bookmarks: { _type: 'application/vnd.oada.bookmarks.1_json' a: { _type: 'application/json', b: { } } } }) Here, the path does not exist, but it should be acceptable. A content type of application/json should be selected. Originally, the tree was supplied to recursively delete links and resources from the given path and further down following the tree. However, the tree is intended to automate content type selection (and make it "safer" for puts).