feat(spec): driveItem creation under drives/items/children + recursive paths#42
Open
dschmidt wants to merge 2 commits into
Open
feat(spec): driveItem creation under drives/items/children + recursive paths#42dschmidt wants to merge 2 commits into
dschmidt wants to merge 2 commits into
Conversation
Broaden /v1beta1/drives/{drive-id}/root/children to describe the general
MS Graph create-driveItem semantics (folder/file/remoteItem) rather than
only share-mounting, and add a sibling
/v1beta1/drives/{drive-id}/items/{item-id}/children POST
(operationId: CreateChildDriveItem) for creation under a non-root parent.
Both endpoints accept a @libre.graph.conflictBehavior query parameter
(enum fail|replace, default fail) controlling same-name child collisions,
matching the MS Graph convention of passing conflict behavior in the URL
rather than the body. MS Graph's third value 'rename' is intentionally
omitted from this enum.
Document the MS Graph colon-syntax URL forms
POST /v1beta1/drives/{drive-id}/root:/{path}:/children
POST /v1beta1/drives/{drive-id}/items/{item-id}:/{path}:/children
on both create-item operations. OpenAPI cannot express the colon-delimited
path segment, so the URL forms aren't represented as separate operations,
but the description makes clear the server accepts them.
Add a @libre.graph.missingParentsBehavior query parameter (enum fail|create,
default fail) controlling recursive creation of missing intermediate
folders along a colon-syntax path. Libregraph extension; ignored for
non-colon URLs.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
POST /v1beta1/drives/{drive-id}/root/childrendescription from share-mounting only to the full MS Graph create-driveItem semantics (folder / file / remoteItem).POST /v1beta1/drives/{drive-id}/items/{item-id}/childrenoperation (operationId: CreateChildDriveItem) for creating items under a non-root parent.@libre.graph.conflictBehaviorquery parameter (enumfail | replace) on both endpoints, controlling same-name child collisions. MS Graph's third valuerenameis omitted./root:/{path}:/childrenand/items/{item-id}:/{path}:/children) in both operation descriptions. OpenAPI cannot express the colon-delimited path segment, so these URL forms aren't represented as separate operations.@libre.graph.missingParentsBehaviorquery parameter (enumfail | create) as a libregraph extension controlling recursive creation of missing intermediate folders along a colon-syntax URL.Notes
@libre.graph.conflictBehavioris a URL query parameter, not a body property. Following MS Graph's driveItem create docs: "The parameter @microsoft.graph.conflictBehavior should be included in the URL instead of the body of the request."MS Graph is inconsistent on this across operations — its createUploadSession places the same annotation inside the request body (under
item). This spec matches each operation's own MS Graph convention; the inconsistency is MS Graph's.renameis omitted from the conflictBehavior enum. MS Graph definesfail | replace | rename. This spec exposesfail | replaceonly. The vendored reva exposes anoverwriteprimitive (net.ParseOverwrite, used inocdav/{move,copy,put}.go) that maps naturally toreplace. There is no equivalent helper for "pick a free name likefoo (2).txt" —renamewould require new server logic, not just wiring. Easier to add later than to spec a capability with no underlying primitive.@libre.graph.missingParentsBehavioris a libregraph extension. No MS Graph equivalent. Controls whether the server auto-creates missing intermediate folders along a colon-syntax URL path. Default isfail(preserving current behavior);createopts into recursive creation.