-
Notifications
You must be signed in to change notification settings - Fork 18
RequestShare: Introduce the notion of a share request #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mickenordin
wants to merge
2
commits into
develop
Choose a base branch
from
kano-request
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,54 @@ paths: | |
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/Discovery" | ||
| /request-share: | ||
| post: | ||
| summary: Request access to a share | ||
| description: > | ||
| This endpoint is used to request access to a share. | ||
| The request MUST contain the share ID and the OCM address of the party | ||
| who wants to receive the share. | ||
| requestBody: | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/RequestShare" | ||
| description: The JSON object to request access to a share. | ||
| required: true | ||
| responses: | ||
| "201": | ||
| description: > | ||
| Consumer successfully received request. | ||
| "400": | ||
| description: > | ||
| Bad request due to invalid parameters, e.g. when `shareId` is missing. | ||
|
Comment on lines
+58
to
+59
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the |
||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/400" | ||
| "501": | ||
| description: The server doesn't support requesting shares. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/Error" | ||
| "503": | ||
| description: The server is temporary unavailable (e.g. due to planned | ||
| maintenance). | ||
| headers: | ||
| Retry-After: | ||
| description: > | ||
| Indication for the client when the service could be requested | ||
| again in HTTP Date format as used by the Internet Message | ||
| Format [RFC5322] (e.g. `Wed, 21 Oct 2015 07:28:00 GMT`) or the | ||
| number of seconds (e.g. 3000 if you the service is expected to | ||
| be available again within 50 minutes). | ||
| schema: | ||
| type: string | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/Error" | ||
| /shares: | ||
| post: | ||
| summary: Share Creation Notification endpoint | ||
|
|
@@ -843,6 +891,29 @@ components: | |
| type: string | ||
| description: Name of the Invite Sender. | ||
| example: John Doe | ||
| RequestShare: | ||
| type: object | ||
| required: | ||
| - sender | ||
| - shareWith | ||
| - shareId | ||
| properties: | ||
| sender: | ||
| type: string | ||
| description: > | ||
| OCM Address of the user who will be requested to share | ||
| the resource. | ||
| example: 527bd5b5d689e2c32ae974c6229ff785@apiwise.nl | ||
| shareWith: | ||
| type: string | ||
| description: > | ||
| OCM Address of the user, group or federation that | ||
| wants to receive a share of the resource. | ||
| example: 51dc30ddc473d43a6011e9ebba6ca770@geant.org | ||
| shareId: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the same as |
||
| type: string | ||
| description: A unique identifier for the resource. | ||
| example: 1234567890abcdef | ||
| TokenRequest: | ||
| type: object | ||
| required: | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we have a problem: a receiver won't know the (opaque) ID of a remote resource, but only a path (or something "human readable"?). Shall we name this simply
share, orsharePath?