Skip to content

Commit 44012b1

Browse files
committed
allow options for each protocol
1 parent be03c09 commit 44012b1

1 file changed

Lines changed: 36 additions & 33 deletions

File tree

spec.yaml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
swagger: '2.0'
1+
swagger: "2.0"
22
info:
33
title: Open Cloud Mesh API
44
description: Open Cloud Mesh Open API Specification.
@@ -44,9 +44,9 @@ paths:
4444
description: The JSON object to create a new share at the consumer side.
4545
required: true
4646
schema:
47-
$ref: '#/definitions/NewShare'
47+
$ref: "#/definitions/NewShare"
4848
responses:
49-
'201':
49+
"201":
5050
description: >
5151
Consumer successfully received the share. The response might contain
5252
the display name of the recipient of the share for general
@@ -58,27 +58,27 @@ paths:
5858
type: string
5959
description: display name of the recipient
6060
example: John Doe
61-
'400':
61+
"400":
6262
description: >
6363
Bad request due to invalid parameters, e.g. when `shareWith` is not
6464
found or required properties are missing.
6565
schema:
66-
$ref: '#/definitions/400'
67-
'401':
66+
$ref: "#/definitions/400"
67+
"401":
6868
description: Client cannot be authenticated as a trusted service.
6969
schema:
70-
$ref: '#/definitions/Error'
71-
'403':
70+
$ref: "#/definitions/Error"
71+
"403":
7272
description: Trusted service is not authorized to create shares.
7373
schema:
74-
$ref: '#/definitions/Error'
75-
'501':
74+
$ref: "#/definitions/Error"
75+
"501":
7676
description: >-
7777
The consumer doesn't support incoming external shares, the share
7878
type or the resource type is not supported.
7979
schema:
80-
$ref: '#/definitions/Error'
81-
'503':
80+
$ref: "#/definitions/Error"
81+
"503":
8282
description: >-
8383
The consumer is temporary unavailable (e.g. due to planned
8484
maintenance).
@@ -93,7 +93,7 @@ paths:
9393
within 50 minutes).
9494
type: string
9595
schema:
96-
$ref: '#/definitions/Error'
96+
$ref: "#/definitions/Error"
9797
/notifications:
9898
post:
9999
summary: Send a notification to a trusted service
@@ -106,34 +106,34 @@ paths:
106106
description: The JSON object with a new notification
107107
required: true
108108
schema:
109-
$ref: '#/definitions/NewNotification'
109+
$ref: "#/definitions/NewNotification"
110110
responses:
111-
'201':
111+
"201":
112112
description: >
113113
Receiver succesfully received the notification. The response body
114114
can contain a JSON object with some resonse data, depending on the
115115
specification of the actual notification.
116-
'400':
116+
"400":
117117
description: >
118118
Bad request due to invalid parameters, e.g. when `type` is invalid
119119
or missing.
120120
schema:
121-
$ref: '#/definitions/400'
122-
'401':
121+
$ref: "#/definitions/400"
122+
"401":
123123
description: Client cannot be authenticated as a trusted service.
124124
schema:
125-
$ref: '#/definitions/Error'
126-
'403':
125+
$ref: "#/definitions/Error"
126+
"403":
127127
description: Trusted service is not authorized to create notifications.
128128
schema:
129-
$ref: '#/definitions/Error'
130-
'501':
129+
$ref: "#/definitions/Error"
130+
"501":
131131
description: >-
132132
The receiver doesn't support notifications, the resource type is not
133133
supported.
134134
schema:
135-
$ref: '#/definitions/Error'
136-
'503':
135+
$ref: "#/definitions/Error"
136+
"503":
137137
description: >-
138138
The receiver is temporary unavailable (e.g. due to planned
139139
maintenance).
@@ -147,7 +147,7 @@ paths:
147147
available again within 50 minutes).
148148
type: string
149149
schema:
150-
$ref: '#/definitions/Error'
150+
$ref: "#/definitions/Error"
151151
/invite-accepted:
152152
post:
153153
summary: Inform the sender that the invitation was accepted to start sharing.
@@ -167,16 +167,16 @@ paths:
167167
400:
168168
description: The invitation token is invalid.
169169
schema:
170-
$ref: "#/definitions/Error"
170+
$ref: "#/definitions/Error"
171171
403:
172172
description: Remote service is not trusted to accept invitations.
173173
schema:
174174
$ref: "#/definitions/Error"
175175
definitions:
176-
'400':
176+
"400":
177177
type: object
178178
allOf:
179-
- $ref: '#/definitions/Error'
179+
- $ref: "#/definitions/Error"
180180
- properties:
181181
validationErrors:
182182
type: array
@@ -299,7 +299,7 @@ definitions:
299299
options:
300300
type: object
301301
description: >
302-
JSON object with protocol specific options, e.g. `uri`,
302+
JSON object with specific options for each protocol, e.g. `uri`,
303303
`access_token`, `password`, `permissions` etc.
304304
For backward compatibility, the webdav protocol will use
305305
`sharedSecret` as username and password.
@@ -308,9 +308,12 @@ definitions:
308308
all relevant applications enabled: implementations may
309309
leverage the public link capability for this feature.
310310
example:
311-
sharedSecret: "hfiuhworzwnur98d3wjiwhr"
312-
permissions: "{https://open-cloud-mesh.org/ns}share-permissions"
313-
uriTemplate: "https://open-cloud-mesh.org/s/{path-to-shared-resources}"
311+
webdav:
312+
sharedSecret: "hfiuhworzwnur98d3wjiwhr"
313+
permissions: "{https://open-cloud-mesh.org/ns}share-permissions"
314+
uriTemplate: "https://open-cloud-mesh.org/s/{path-to-shared-resources}"
315+
webapp:
316+
uriTemplate: "https://open-cloud-mesh.org/s/{path-to-shared-resources}"
314317
NewNotification:
315318
type: object
316319
required:
@@ -346,7 +349,7 @@ definitions:
346349
allOf:
347350
- properties:
348351
recipientProvider:
349-
type: string
352+
type: string
350353
format: url
351354
description: URL of the receiver OCM service.
352355
example: https://receiver.org

0 commit comments

Comments
 (0)