Repository navigation
feat(graph): add the v1beta1 endpoints for a single drive - #3941
pbleser-oc wants to merge 1 commit into
Conversation
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
Not up to standards ⛔🟢 Coverage
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ +0.05% coverage variation (-1.00%) |
| Diff coverage | ✅ 100.00% diff coverage |
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.
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,PATCHandDELETEon/graph/v1beta1/drives/{driveID}, andPOSTon/graph/v1beta1/drives.GET,POSTandPATCHreturn 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 andgrantedToV2, instead of the old role names andgrantedToIdentities.DELETEbehaves the same in both versions.Tests:
apiSpaces/spaceApiVersions.feature, which creates, gets, renames, disables and deletes a project space through each version.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.