Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msgraph-sdk-python expects a response from /drives/{drive-id}/items/{driveItem-id}/copy #659

Open
aberezh opened this issue Jul 30, 2024 · 1 comment
Labels

Comments

@aberezh
Copy link

aberezh commented Jul 30, 2024

This issue is created as a follow-up to this pull request.

In msgraph-sdk-python the CopyRequestBuilder (that uses /drives/{drive-id}/items/{driveItem-id}/copy API endpoint) on POST is expecting a DriveItem as a response from Microsoft Graph, while the driveitem_copy REST API doesn't return anything.
The code change that I suggested in the pull request mentioned above fixes the problem. But it affects the auto-generated code, so I was asked to create this issue.

More info can also be found in this issue on msgraph-sdk-python.

@baywet
Copy link
Member

baywet commented Jul 30, 2024

Thanks for creating the issue.

For context this is the action we're talking about

<Action Name="copy" IsBound="true">
        <Parameter Name="bindingParameter" Type="graph.driveItem" />
        <Parameter Name="name" Type="Edm.String" Unicode="false" />
        <Parameter Name="parentReference" Type="graph.itemReference" />
        <ReturnType Type="graph.driveItem" />
        <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
          <Record>
            <PropertyValue Property="Description" String="driveItem: copy" />
            <PropertyValue Property="LongDescription" String="Asynchronously creates a copy of an driveItem (including any children), under a new parent item or with a new name." />
          </Record>
        </Annotation>
        <Annotation Term="Org.OData.Core.V1.Links">
          <Collection>
            <Record>
              <PropertyValue Property="rel" String="https://graph.microsoft.com/rels/docs/action" />
              <PropertyValue Property="href" String="https://learn.microsoft.com/graph/api/driveitem-copy?view=graph-rest-1.0" />
            </Record>
          </Collection>
        </Annotation>
      </Action>

We could make an XSLT entry so the type changes to void instead, but I'd like for us to confirm with the workload this is effectively the case before we do so. (meaning, it's always LRO pattern and will NEVER return a payload)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants