Autodesk-Forge / forge-php-client

Forge PHP SDK: Enables you to easily integrate the Forge REST APIs into your application, including OAuth, Data Management,Model Derivative, and Design Automation
Apache License 2.0
41 stars 52 forks source link

getWorkItem does not work because of incorrect resource path #12

Open oemmes opened 6 years ago

oemmes commented 6 years ago

Getting a work item as follows does not work:

$apiInstance = new Autodesk\Forge\Client\Api\WorkItemsApi($authObject);
$result = $apiInstance->getWorkItem($id);

The problem is that the quotation marks of the resource path around the ID are htmlencoded in the PHP source:

Instead of

$resourcePath = "/autocad.io/us-east/v2/WorkItems('{id}')";

it is

$resourcePath = "/autocad.io/us-east/v2/WorkItems('{id}')";

See here: https://github.com/Autodesk-Forge/forge-php-client/blob/master/lib/Api/WorkItemsApi.php#L322

This is also the case for all other endpoints which use the ('{id}') appendix.

We want to switch from our own API implementation to the forge-php-client but this issue prevents us from doing so.