Skip to content

Conversation

tylerwarner33
Copy link
Contributor

Reason

Changes

  • Added 'PathInProject' property to the ItemAttributes class.
    • 'PathInProject' property exists in the response documentation.
    • 'PathInProject' property exists in the response data (sample data from Postman request).
      {
        "jsonapi": { },
        "links": { },
        "data": {
          "type": "items",
          "id": "urn:adsk.wipprod:dm.lineage:123ABC",
          "attributes": {
            "displayName": "TestFile.xlsx",
            "createTime": "2025-05-08T00:00:00.0000000Z",
            "createUserId": "456DEF",
            "createUserName": "Sample User",
            "lastModifiedTime": "2025-05-08T00:00:00.0000000Z",
            "lastModifiedUserId": "456DEF",
            "lastModifiedUserName": "Sample User",
            "hidden": false,
            "reserved": false,
            "extension": { },
            "pathInProject": "/Project Files/Test Folder"
          },
          "links": { },
          "relationships": { }
        },
        "included": [ ]
      }
    • 'PathInProject' property was missing from the ItemAttributes class definition.
  • Updated TestGetItemAsync() in the TestDataManagement class to test changes.

Testing

[TestMethod]
public async Task TestGetItemAsync()
{
   Item item = await _DataManagement.GetItemAsync(projectId: projectId, itemId: itemId, accessToken: token, includePathInProject: true);   
   Assert.IsTrue(item?.Data?.Type == TypeItem.Items);
}

Reference Methods:

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the missing PathInProject property to the ItemAttributes class to align with the Autodesk Platform Services API documentation and response data. The property represents the relative path of an item starting from the project's root folder.

  • Added PathInProject property to ItemAttributes class with proper documentation
  • Enabled and updated the TestGetItemAsync() test method to verify the new property functionality
  • Removed commented-out environment variable declarations and unused whitespace

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
datamanagement/source/Model/ItemAttributes.gen.cs Added PathInProject property with XML documentation and DataMember attribute
datamanagement/test/TestDataManagement.cs Cleaned up comments, enabled test method with includePathInProject parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataManagement method GetItemAsync ignores parameter "includePathInProject"
1 participant