Skip to content

Commit e3031d7

Browse files
authored
Rephrased headers of all endpoints to improve consistency (#202)
* Rephrased headers of all endpoints to improve consistency * Added a link also on the top header
1 parent 7c13c07 commit e3031d7

File tree

2 files changed

+27
-29
lines changed

2 files changed

+27
-29
lines changed

IETF-RFC.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ itself be an object containing the following fields:
309309
* OPTIONAL: inviteAcceptDialog (string) - URL path of a web page where a user can accept an invite, when query parameters `"token"` and `"providerDomain"` are provided. Implementations that offer the `"invites"` capability SHOULD provide this URL as well in order to enhance the UX of the Invite Flow. If for example `"/index.php/apps/sciencemesh/accept"` is specified here then a WAYF Page SHOULD redirect the end-user to `/index.php/apps/sciencemesh/accept?token=zi5kooKu3ivohr9a&providerDomain=example.com`.
310310

311311
# Share Creation Notification
312-
To create a share, the sending server SHOULD make a HTTP POST request
312+
To create a Share, the Sending Server SHOULD make a HTTP POST request
313313

314314
* to the `/shares` path in the Receiving Server's OCM API
315315
* using `application/json` as the `Content-Type` HTTP request header
@@ -488,6 +488,10 @@ make a HTTP POST request
488488
* OPTIONAL resourceType (string) - copied from the Share Creation Notification for the Share this notification is about
489489
* OPTIONAL notification (object) - optional additional parameters, depending on the notification and the resource type
490490

491+
For example, a notification MAY be sent by a recipient to let the provider know that the recipient declined a share. In this case, the provider site MAY mark the share as declined for its user(s).
492+
Similarly, it MAY be sent by a provider to let the recipient know that the provider removed a given share, such that the recipient MAY clean it up from its database.
493+
A notification MAY also be sent to let a recipient know that the provider removed that recipient from the list of trusted users, along with any related share. The recipient MAY reciprocally remove that provider from the list of trusted users, along with any related share.
494+
491495

492496
### Receiving Party Notification
493497
If the Share Creation Notification is not discarded by the Receiving Server, they MAY notify the Receiving Party passively by adding the Share to some inbox list, and MAY also notify them actively through for instance a push notification or an email message.

spec.yaml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
openapi: 3.0.3
22
info:
33
title: Open Cloud Mesh API
4-
description: Open Cloud Mesh Open API Specification.
4+
description: >
5+
Open Cloud Mesh OpenAPI Specification.
6+
The semantic of the Protocol Specification is detailed in the
7+
[IETF-RFC.md](https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md) document.
58
version: 1.2.0
69
x-logo:
710
url: logo.png
@@ -32,8 +35,8 @@ paths:
3235
get:
3336
summary: Legacy discovery endpoint
3437
description: >
35-
This endpoint is a replica of `/.well-known/ocm`, and MUST be
36-
served at the OCM Server's root FQDN as well.
38+
This endpoint is a replica of `/.well-known/ocm`, and MUST be served
39+
at the OCM Server's root FQDN as well to ensure backwards compatibility.
3740
OCM Servers MUST support both.
3841
responses:
3942
"200":
@@ -44,11 +47,11 @@ paths:
4447
$ref: "#/components/schemas/Discovery"
4548
/shares:
4649
post:
47-
summary: Create a new share
50+
summary: Share Creation Notification endpoint
4851
description: >
49-
After the provider created a local share, it sends a `share` object to
50-
the consumer containing the information which is needed to start
51-
synchronization between the two services.
52+
This endpoint is used by a Sending Server to notify a Receiving Server that
53+
a new Share has been created. See [Share Creation Notification](https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md#share-creation-notification)
54+
for more details.
5255
requestBody:
5356
content:
5457
application/json:
@@ -117,21 +120,12 @@ paths:
117120
$ref: "#/components/schemas/Error"
118121
/notifications:
119122
post:
120-
summary: Send a notification to a remote party about a previously known entity
123+
summary: Share Acceptance Notification endpoint
121124
description: >
122-
Notifications are optional messages. They are expected to be used to
123-
inform the
124-
other party about a change about a previously known entity, such as a share or
125-
a trusted user.
126-
For example, a notification MAY be sent by a recipient to let the provider know
127-
that the recipient declined a share. In this case, the provider site MAY mark the
128-
share as declined for its user(s).
129-
Similarly, it MAY be sent by a provider to let the recipient know that the provider
130-
removed a given share, such that the recipient MAY clean it up from its database.
131-
A notification MAY also be sent to let a recipient know that the provider
132-
removed that recipient from the list of trusted users, along with any related share.
133-
The recipient MAY reciprocally remove that provider from the list of trusted users,
134-
along with any related share.
125+
This optional endpoint is used to inform the other party about a change
126+
that concerns a previously known entity, such as a Share or a trusted User.
127+
See [Share Acceptance Notification](https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md#share-acceptance-notification)
128+
for more details.
135129
requestBody:
136130
content:
137131
application/json:
@@ -193,11 +187,10 @@ paths:
193187
$ref: "#/components/schemas/Error"
194188
/invite-accepted:
195189
post:
196-
summary: |
197-
Inform the sender that an invitation was accepted to start sharing.
190+
summary: Invitation Acceptance endpoint
198191
description: >
199-
See the Open Cloud Mesh [Invite flow
200-
spec](https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md#invite-flow)
192+
This optional endpoint is used to inform the Sender that an Invitation was accepted.
193+
See [Invite flow](https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md#invite-flow)
201194
for more details.
202195
requestBody:
203196
content:
@@ -240,10 +233,11 @@ paths:
240233
$ref: "#/components/schemas/Error"
241234
/token:
242235
post:
243-
summary: Obtain a (potentially short-lived) bearer token in exchange for a code
236+
summary: Token Exchange endpoint
244237
description: >
245-
See
246-
https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md#resource-access
238+
This optional endpoint allows to obtain a (potentially short-lived) bearer token in exchange for a code.
239+
See [Resource Access](https://github.com/cs3org/OCM-API/blob/develop/IETF-RFC.md#resource-access)
240+
for more details.
247241
requestBody:
248242
content:
249243
application/json:

0 commit comments

Comments
 (0)