forked from reanahub/reana-commons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openapi): create endpoints to get sharing users (reanahub#429)
Adds two endpoints: - fetch who shared workflows with the user - fetch who the user shared workflows with Closes reanahub/reana-server#648 and reanahub/reana-server#649
- Loading branch information
1 parent
d1aa228
commit 2a7e834
Showing
1 changed file
with
210 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -1242,6 +1242,216 @@ | |
"summary": "Requests a new access token for the authenticated user." | ||
} | ||
}, | ||
"/api/users/shared-with-you": { | ||
"get": { | ||
"description": "This resource provides information about users that shared workflow(s) with the authenticated user.", | ||
"operationId": "get_users_shared_with_you", | ||
"parameters": [ | ||
{ | ||
"description": "API access_token of user.", | ||
"in": "query", | ||
"name": "access_token", | ||
"required": false, | ||
"type": "string" | ||
} | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Users that shared workflow(s) with the authenticated user.", | ||
"examples": { | ||
"application/json": { | ||
"users_shared_with_you": [ | ||
{ | ||
"email": "[email protected]", | ||
"full_name": "John Doe", | ||
"username": "jdoe" | ||
} | ||
] | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"users": { | ||
"items": { | ||
"properties": { | ||
"email": { | ||
"type": "string" | ||
}, | ||
"full_name": { | ||
"type": "string" | ||
}, | ||
"username": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"401": { | ||
"description": "Error message indicating that the uses is not authenticated.", | ||
"examples": { | ||
"application/json": { | ||
"message": "User not logged in" | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"403": { | ||
"description": "Request failed. User token not valid.", | ||
"examples": { | ||
"application/json": { | ||
"message": "Token is not valid." | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"500": { | ||
"description": "Request failed. Internal server error.", | ||
"examples": { | ||
"application/json": { | ||
"message": "Internal server error." | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"summary": "Gets users that shared workflow(s) with the authenticated user." | ||
} | ||
}, | ||
"/api/users/you-shared-with": { | ||
"get": { | ||
"description": "This resource provides information about users that the authenticated user shared workflow(s) with.", | ||
"operationId": "get_users_you_shared_with", | ||
"parameters": [ | ||
{ | ||
"description": "API access_token of user.", | ||
"in": "query", | ||
"name": "access_token", | ||
"required": false, | ||
"type": "string" | ||
} | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Users that the authenticated user shared workflow(s) with.", | ||
"examples": { | ||
"application/json": { | ||
"users_you_shared_with": [ | ||
{ | ||
"email": "[email protected]", | ||
"full_name": "John Doe", | ||
"username": "jdoe" | ||
} | ||
] | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"users": { | ||
"items": { | ||
"properties": { | ||
"email": { | ||
"type": "string" | ||
}, | ||
"full_name": { | ||
"type": "string" | ||
}, | ||
"username": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"401": { | ||
"description": "Error message indicating that the uses is not authenticated.", | ||
"examples": { | ||
"application/json": { | ||
"message": "User not logged in" | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"403": { | ||
"description": "Request failed. User token not valid.", | ||
"examples": { | ||
"application/json": { | ||
"message": "Token is not valid." | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"500": { | ||
"description": "Request failed. Internal server error.", | ||
"examples": { | ||
"application/json": { | ||
"message": "Internal server error." | ||
} | ||
}, | ||
"schema": { | ||
"properties": { | ||
"message": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"summary": "Gets users that the authenticated user shared workflow(s) with." | ||
} | ||
}, | ||
"/api/workflows": { | ||
"get": { | ||
"description": "This resource return all current workflows in JSON format.", | ||
|