Re: [Specifications] Add Use Case: Creating events indirectly (ie. with PUT)

Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.

---

*[drafts/use-cases/5.1.creating-new-event-indirectly.md, line 64 at r1](https://reviewable.io:443/reviews/hydracg/specifications/143#-KxYcL7VkgLlvZsRJlA4:-KxYcL7XAcJGF-UQnoVE:boekxy6) ([raw file](https://github.com/hydracg/specifications/blob/f03e3028e6417adf2767a44c0c854b4af3b5fb4d/drafts/use-cases/5.1.creating-new-event-indirectly.md#L64)):*
> ```Markdown
>     "totalItems": 0,
>     "members": [ ],
>     "http://example.com/vocab/createEvent": {
> ```

the `manages` block already signals that this collection 'contains' instances of `schema:Event`, and to create we already rely on `schema:CreateAction`, if we take approach similar to `hydra:search` I would prefer to define very generic `hydra:add` which would link to a `hydra:Resource` or 'hydra:IriTemplate`

---

*[drafts/use-cases/5.1.creating-new-event-indirectly.md, line 116 at r1](https://reviewable.io:443/reviews/hydracg/specifications/143#-KxYdjO5DKeU7wFvRf8f:-KxYdjO62eUZh6qMs0cs:b-dr0zrf) ([raw file](https://github.com/hydracg/specifications/blob/f03e3028e6417adf2767a44c0c854b4af3b5fb4d/drafts/use-cases/5.1.creating-new-event-indirectly.md#L116)):*
I would myself include an `@id` even when creating a new resource, since client decides the IRI. To recognize Create vs. Update one should probably do conditional request and use `If-Match` HTTP header https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match

> The `If-Match` HTTP request header makes the request conditional. For GET and HEAD methods, the server will send back the requested resource only if it matches one of the listed ETags. For PUT and other non-safe methods, it will only upload the resource in this case.

---


*Comments from [Reviewable](https://reviewable.io:443/reviews/hydracg/specifications/143)*
<!-- Sent from Reviewable.io -->


-- 
GitHub Notification of comment by elf-pavlik
Please view or discuss this issue at https://github.com/HydraCG/Specifications/pull/143#issuecomment-340200302 using your GitHub account

Received on Saturday, 28 October 2017 15:46:59 UTC