This PR clarifies how notifications are actually used by implementations, in particular Nextcloud.
Added a full example and details of possible notification types
Removed a required but unspecified field
Added providerId (already present in Nextcloud's payload) as a required field. Without it the notification cannot be consumed by the target!
Extended the description to cover for the expected/typical side effects as MAY behaviors following a notification
To be noted that the response HTTP code in case of success was/is 201 CREATED. It is debatable why such a response was chosen and whether a standard 200 OK or even 202 ACCEPTED (cf https://github.com/cs3org/OCM-API/issues/31) would be more appropriate, but this is left outside this PR as it would be a breaking change.
I'm moving forward and merging this to avoid leaving stuff behind. As explained, this is just adding comments and fixing the spec according to how it was actually implemented.
This PR clarifies how notifications are actually used by implementations, in particular Nextcloud.
required
but unspecified fieldproviderId
(already present in Nextcloud's payload) as arequired
field. Without it the notification cannot be consumed by the target!To be noted that the response HTTP code in case of success was/is
201 CREATED
. It is debatable why such a response was chosen and whether a standard200 OK
or even202 ACCEPTED
(cf https://github.com/cs3org/OCM-API/issues/31) would be more appropriate, but this is left outside this PR as it would be a breaking change.