Skip to content

feat(graph): add the v1beta1 endpoints for a single drive - #3941

Open
pbleser-oc wants to merge 1 commit into
opencloud-eu:workpagagesfrom
pbleser-oc:feat/graph-drive-v1beta1-aliases
Open

pbleser-oc wants to merge 1 commit into
opencloud-eu:workpagagesfrom
pbleser-oc:feat/graph-drive-v1beta1-aliases

Conversation

@pbleser-oc

@pbleser-oc pbleser-oc commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Under /graph/v1beta1, drives can only be listed so far. This adds the v1beta1 counterparts of the v1.0 endpoints for a single drive: GET, PATCH and DELETE on /graph/v1beta1/drives/{driveID}, and POST on /graph/v1beta1/drives.

  • They take the same requests as their v1.0 counterparts.
  • GET, POST and PATCH return the drive in the v1beta1 format, like the v1beta1 list of drives does. With $expand=root($expand=permissions), the permissions carry the IDs of the unified roles and grantedToV2, instead of the old role names and grantedToIdentities. DELETE behaves the same in both versions.
  • The handlers for getting, creating and updating a drive now take the API version as a parameter.

Tests:

  • Unit tests for both versions.
  • A new acceptance feature, apiSpaces/spaceApiVersions.feature, which creates, gets, renames, disables and deletes a project space through each version.
  • The space helpers of the acceptance tests can now use either version, with v1.0 as the default.

API spec: opencloud-eu/libre-graph-api#85 adds these operations to the spec, so that clients can use them once they're regenerated. This PR doesn't depend on it.

Merge order: this changes CreateDrive, as does #3899, so it should be merged after #3899. I'll rebase it once that one is in.

AI assistance: Claude Code (claude-opus-5-5) wrote the first draft of the code, the tests and this description.

Under /graph/v1beta1, drives could only be listed. Getting, creating,
updating and deleting a single drive was only possible under v1.0,
which returns the permissions of a drive's root with the old role names
instead of the IDs of the unified roles.

Add GET, PATCH and DELETE on /graph/v1beta1/drives/{driveID}, and POST
on /graph/v1beta1/drives. They take the same requests as their v1.0
counterparts. GET, POST and PATCH return the drive in the v1beta1
format, like the v1beta1 list of drives does: with
$expand=root($expand=permissions), the permissions carry the unified
role IDs and grantedToV2. DELETE behaves the same in both versions.

The handlers for getting, creating and updating a drive now take the
API version as a parameter, and the v1.0 and v1beta1 routes call them
with their own version.

The acceptance test helpers for spaces can now use either version of
the Graph API.

Assisted-by: Claude Code:claude-opus-5-5
@codacy-production

codacy-production Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🟢 Coverage 100.00% diff coverage · +0.05% coverage variation

Metric Results
Coverage variation ✅ +0.05% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (83615f2) Report Missing Report Missing Report Missing
Head commit (db601d6) 92662 (+22) 25469 (+51) 27.49% (+0.05%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3941) 25 25 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@micbar micbar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants