-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15655 from opf/code-maintenance/55158-extend-stor…
…age-api-to-include-completeness [#55158] Add complete attribute to storage representer
- Loading branch information
Showing
15 changed files
with
659 additions
and
160 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
docs/api/apiv3/components/examples/storage-nextcloud-response-for-creation.yml
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Example: Nextcloud storage on creation (includes client secret) | ||
--- | ||
value: | ||
_type: Storage | ||
id: 1337 | ||
name: My New DeathStar | ||
hasApplicationPassword: false | ||
createdAt: '2024-05-21T09:11:53.880Z' | ||
updatedAt: '2024-05-21T09:11:53.880Z' | ||
complete: false | ||
_embedded: | ||
oauthApplication: | ||
id: 42 | ||
_type: OAuthApplication | ||
name: My New DeathStar (Nextcloud) | ||
clientId: gNQ-gi3VX59ruoft5B9aRmukEYbZOhKIsxXE9iT1tcQ | ||
confidential: true | ||
clientSecret: 79hIlb1Ezj5kPx8LgE6LI9L1-mb8g7jX1-u_a08RJlI | ||
createdAt: '2024-05-21T09:11:53.908Z' | ||
updatedAt: '2024-05-21T09:11:53.908Z' | ||
scopes: | ||
- api_v3 | ||
_links: | ||
self: | ||
href: '/api/v3/oauth_applications/42' | ||
owner: | ||
href: '/api/v3/users/13' | ||
title: Darth Vader | ||
integration: | ||
href: '/api/v3/storages/1337' | ||
title: My New DeathStar | ||
redirectUri: | ||
- href: 'https://nextcloud.deathstar.rocks/index.php/apps/integration_openproject/oauth-redirect' | ||
_links: | ||
self: | ||
href: /api/v3/storages/1337 | ||
title: My New DeathStar | ||
type: | ||
href: urn:openproject-org:api:v3:storages:Nextcloud | ||
title: Nextcloud | ||
origin: | ||
href: https://nextcloud.deathstar.rocks/ | ||
open: | ||
href: /api/v3/storages/1337/open | ||
prepareUpload: [] | ||
authorizationState: | ||
href: urn:openproject-org:api:v3:storages:authorization:FailedAuthorization | ||
title: Authorization failed | ||
projectStrages: | ||
href: /api/v3/project_storages?filters=[{"storageId":{"operator":"=","values":["1337"]}}] | ||
oauthApplication: | ||
href: /api/v3/oauth_application/42 | ||
title: My New DeathStar (Nextcloud) | ||
oauthClientCredentials: | ||
href: null |
86 changes: 86 additions & 0 deletions
86
docs/api/apiv3/components/examples/storage-nextcloud-response.yml
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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Example: Nextcloud storage | ||
--- | ||
value: | ||
_type: Storage | ||
id: 1337 | ||
name: It's no moon | ||
hasApplicationPassword: true | ||
createdAt: '2021-12-20T13:37:00.211Z' | ||
updatedAt: '2021-12-20T13:37:00.211Z' | ||
complete: true | ||
_embedded: | ||
oauthApplication: | ||
id: 42 | ||
_type: OAuthApplication | ||
name: It's no moon (Nextcloud) | ||
clientId: O5h6WObhMg1Z8IcLHRE3_LMh4jJYmmca2V6OTFSv8DA | ||
confidential: true | ||
createdAt: '2022-12-07T12:56:42.626Z' | ||
updatedAt: '2022-12-07T12:56:42.626Z' | ||
scopes: | ||
- api_v3 | ||
_links: | ||
self: | ||
href: '/api/v3/oauth_applications/42' | ||
owner: | ||
href: '/api/v3/users/13' | ||
title: Darth Vader | ||
integration: | ||
href: '/api/v3/storages/1337' | ||
title: It's no moon | ||
redirectUri: | ||
- href: 'https://nextcloud.deathstar.rocks/index.php/apps/integration_openproject/oauth-redirect' | ||
oauthClientCredentials: | ||
_type: OAuthClientCredentials | ||
id: 42 | ||
clientId: fGEFWxIpROrpci25TW6qWCZozDFEAKSkonMBkrf3LYvBXRljBbLajBf2vD2fjePm | ||
confidential: true | ||
createdAt: '2023-12-08T09:49:24.397Z' | ||
updatedAt: '2023-12-08T09:49:24.397Z' | ||
_links: | ||
self: | ||
href: /api/v3/oauth_client_credentials/42 | ||
integration: | ||
href: /api/v3/storages/1337 | ||
title: It's no moon | ||
_links: | ||
self: | ||
href: /api/v3/storages/1337 | ||
title: It's no moon | ||
type: | ||
href: urn:openproject-org:api:v3:storages:Nextcloud | ||
title: Nextcloud | ||
origin: | ||
href: https://nextcloud.deathstar.rocks/ | ||
prepareUpload: | ||
- href: /api/v3/storages/1337/files/prepare_upload | ||
method: post | ||
title: Upload file | ||
payload: | ||
projectId: 21 | ||
fileName: '{fileName}' | ||
parent: '{parent}' | ||
templated: true | ||
- href: /api/v3/storages/95/files/prepare_upload | ||
method: post | ||
title: Upload file | ||
payload: | ||
projectId: 11 | ||
fileName: '{fileName}' | ||
parent: '{parent}' | ||
templated: true | ||
open: | ||
href: /api/v3/storages/1337/open | ||
authorizationState: | ||
href: urn:openproject-org:api:v3:storages:authorization:Connected | ||
title: Connected | ||
# authorize: | ||
# href: https://nextcloud.deathstar.rocks/authorize/ | ||
# title: Authorize | ||
projectStrages: | ||
href: /api/v3/project_storages?filters=[{"storageId":{"operator":"=","values":["1337"]}}] | ||
oauthApplication: | ||
href: /api/v3/oauth_application/42 | ||
title: It's no moon (Nextcloud) | ||
oauthClientCredentials: | ||
href: /api/v3/oauth_client_credentials/42 |
70 changes: 70 additions & 0 deletions
70
docs/api/apiv3/components/examples/storage-nextcloud-unauthorized-response.yml
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Example: Nextcloud storage | ||
--- | ||
value: | ||
_type: Storage | ||
id: 1337 | ||
name: It's no moon | ||
hasApplicationPassword: false | ||
createdAt: '2021-12-20T13:37:00.211Z' | ||
updatedAt: '2021-12-20T13:37:00.211Z' | ||
complete: true | ||
_embedded: | ||
oauthApplication: | ||
id: 42 | ||
_type: OAuthApplication | ||
name: It's no moon (Nextcloud) | ||
clientId: O5h6WObhMg1Z8IcLHRE3_LMh4jJYmmca2V6OTFSv8DA | ||
confidential: true | ||
createdAt: '2022-12-07T12:56:42.626Z' | ||
updatedAt: '2022-12-07T12:56:42.626Z' | ||
scopes: | ||
- api_v3 | ||
_links: | ||
self: | ||
href: '/api/v3/oauth_applications/42' | ||
owner: | ||
href: '/api/v3/users/13' | ||
title: Darth Vader | ||
integration: | ||
href: '/api/v3/storages/1337' | ||
title: It's no moon | ||
redirectUri: | ||
- href: 'https://nextcloud.deathstar.rocks/index.php/apps/integration_openproject/oauth-redirect' | ||
oauthClientCredentials: | ||
_type: OAuthClientCredentials | ||
id: 42 | ||
clientId: fGEFWxIpROrpci25TW6qWCZozDFEAKSkonMBkrf3LYvBXRljBbLajBf2vD2fjePm | ||
confidential: true | ||
createdAt: '2023-12-08T09:49:24.397Z' | ||
updatedAt: '2023-12-08T09:49:24.397Z' | ||
_links: | ||
self: | ||
href: /api/v3/oauth_client_credentials/42 | ||
integration: | ||
href: /api/v3/storages/1337 | ||
title: It's no moon | ||
_links: | ||
self: | ||
href: /api/v3/storages/1337 | ||
title: It's no moon | ||
type: | ||
href: urn:openproject-org:api:v3:storages:Nextcloud | ||
title: Nextcloud | ||
origin: | ||
href: https://nextcloud.deathstar.rocks/ | ||
prepareUpload: [] | ||
open: | ||
href: /api/v3/storages/1337/open | ||
authorizationState: | ||
href: urn:openproject-org:api:v3:storages:authorization:FailedAuthorization | ||
title: Authorization failed | ||
authorize: | ||
href: https://nextcloud25.local/index.php/apps/oauth2/authorize?client_id=fnrIeJZqqAKGQlejuDaGhSQfCAVtoayHLACWCYcPJ0w17Pp6daPPUktkM9QaGxca&redirect_uri=https://openproject.local/oauth_clients/fnrIeJZqqAKGQlejuDaGhSQfCAVtoayHLACWCYcPJ0w17Pp6daPPUktkM9QaGxca/callback&response_type=code | ||
title: Authorize | ||
projectStrages: | ||
href: /api/v3/project_storages?filters=[{"storageId":{"operator":"=","values":["1337"]}}] | ||
oauthApplication: | ||
href: /api/v3/oauth_application/42 | ||
title: It's no moon (Nextcloud) | ||
oauthClientCredentials: | ||
href: /api/v3/oauth_client_credentials/42 |
28 changes: 28 additions & 0 deletions
28
docs/api/apiv3/components/examples/storage-one-drive-incomplete-response.yml
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Example: OneDrive storage | ||
--- | ||
value: | ||
_type: Storage | ||
id: 1337 | ||
name: It's no moon | ||
tenantId: e36f1dbc-fdae-427e-b61b-0d96ddfb81a4 | ||
driveId: null | ||
createdAt: '2021-12-20T13:37:00.211Z' | ||
updatedAt: '2021-12-20T13:37:00.211Z' | ||
complete: false | ||
_links: | ||
self: | ||
href: /api/v3/storages/1337 | ||
title: It's no moon | ||
type: | ||
href: urn:openproject-org:api:v3:storages:OneDrive | ||
title: OneDrive/SharePoint | ||
prepareUpload: [] | ||
open: | ||
href: /api/v3/storages/1337/open | ||
authorizationState: | ||
href: urn:openproject-org:api:v3:storages:authorization:FailedAuthorization | ||
title: Authorization failed | ||
projectStrages: | ||
href: /api/v3/project_storages?filters=[{"storageId":{"operator":"=","values":["1337"]}}] | ||
oauthClientCredentials: | ||
href: /api/v3/oauth_client_credentials/42 |
50 changes: 50 additions & 0 deletions
50
docs/api/apiv3/components/examples/storage-one-drive-response.yml
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Example: OneDrive storage | ||
--- | ||
value: | ||
_type: Storage | ||
id: 1337 | ||
name: It's no moon | ||
tenantId: e36f1dbc-fdae-427e-b61b-0d96ddfb81a4 | ||
driveId: b!FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8Qconfm2i6SKEoCmuGYqQK | ||
createdAt: '2021-12-20T13:37:00.211Z' | ||
updatedAt: '2021-12-20T13:37:00.211Z' | ||
complete: true | ||
_embedded: | ||
oauthClientCredentials: | ||
_type: OAuthClientCredentials | ||
id: 42 | ||
clientId: b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff | ||
confidential: true | ||
createdAt: '2023-12-08T09:49:24.397Z' | ||
updatedAt: '2023-12-08T09:49:24.397Z' | ||
_links: | ||
self: | ||
href: /api/v3/oauth_client_credentials/42 | ||
integration: | ||
href: /api/v3/storages/1337 | ||
title: It's no moon | ||
_links: | ||
self: | ||
href: /api/v3/storages/1337 | ||
title: It's no moon | ||
type: | ||
href: urn:openproject-org:api:v3:storages:OneDrive | ||
title: OneDrive/SharePoint | ||
prepareUpload: | ||
- href: /api/v3/storages/1337/files/prepare_upload | ||
method: post | ||
title: Upload file | ||
payload: | ||
projectId: 33 | ||
fileName: '{fileName}' | ||
parent: '{parent}' | ||
templated: true | ||
open: | ||
href: /api/v3/storages/1337/open | ||
authorizationState: | ||
href: urn:openproject-org:api:v3:storages:authorization:Connected | ||
title: Connected | ||
projectStrages: | ||
href: /api/v3/project_storages?filters=[{"storageId":{"operator":"=","values":["1337"]}}] | ||
oauthClientCredentials: | ||
href: /api/v3/oauth_client_credentials/42 |
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
Oops, something went wrong.