Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 39 additions & 31 deletions spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,42 +355,47 @@ paths:
type: string
schema:
$ref: "#/definitions/Error"
/invite/accept:
/invite/forward:
post:
summary: Accept an invite to a shared document
description: Foo
summary: Forward an invitation to start sharing
description: Forwards an invitation received by an out-of-band channel, email for example.
parameters:
- name: invite
in: body
description: The JSON object to notify OCM that an invite has been accepted.
description: The JSON object representing an invitation to send to an end-user.
required: true
schema:
$ref: "#/definitions/AcceptInvite"
$ref: "#/definitions/Invite"
responses:
200:
description: Auth ok!
description: Invitation sent.
400:
description: Invalid token?
description: |
Bad request due to invalid parameters, e.g. email is not valid.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably remove "email" and maybe put "provider"?

schema:
$ref: "#/definitions/Error"
invite/forward:
$ref: "#/definitions/400"
/invite/accept:
post:
summary: Forward information from invite to the cloud provider.
description: Foo
summary: Accept an invititation to start sharing.
description: Accepts an invitation to the shared document so the provider can initiate the OCM share creation.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this description needs to be updated, I'm not sure exactly how though. But isn't this an invitation to be able to share with someone ie in some sense decoupled from the sharing itself, like:

  1. Invite A
  2. Now one can share with A?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you accept the invitation to create a share with the person. Invitation and share creation are both decoupled. We can remove the shared document part.

parameters:
- name: invite
in: body
description: The JSON object to send to the cloud provider with the invitaiton information.
description: The JSON object to notify the OCM provider that an invite has been accepted.
required: true
schema:
$ref: "#/definitions/Invite"
$ref: "#/definitions/AcceptInvite"
responses:
200:
description: Ok!
description: Invitation accepted.
400:
description: Invalid token?
description: The invitation token is invalid.
schema:
$ref: "#/definitions/Error"
403:
description: Remote service is not trusted to accept invitations.
schema:
$ref: "#/definitions/Error"
definitions:
400:
type: object
Expand Down Expand Up @@ -547,30 +552,33 @@ definitions:
allOf:
- properties:
userId:
type: string # probably uuid?
description: Unique ID to identify the person accepting the invite.
type: string
description: Unique ID to identify the user at the remote provider accepting the invite.
example: 9303
provider:
type: string # probably uuid?
description: Id to identify the provider
example: abc
type: string
format: url
description: URL of the receiver OCM service.
example: https://receiver.org/ocm
token:
type: string # probably some other kind of token
type: string
description: Token received in the invite
example: abc-123
example: xyz
senderProvider:
type: string # probably uuid?
description: Id to identify the provider of the sender
example: ddd
type: string
format: url
description: URL of the OCM sender service.
example: https://sender.org/ocm/
Invite:
type: object
allOf:
- properties:
token:
type: string # probably some other kind of token
description: Token received in the invite
example: abc-123
type: string
description: Token generated by the service sending the invitation.
example: xyz
senderProvider:
type: string # probably uuid?
description: Id to identify the provider of the sender
example: ddd
type: string
format: url
description: URL of the OCM sender service.
example: https://sender.org/ocm/