Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Fix #46 #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/Api/FoldersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **postFolder**
> postFolder($body)
> postFolder($project_id, $body)



Expand All @@ -290,7 +290,7 @@ $apiInstance = new Autodesk\Forge\Client\Api\FoldersApi($authObject);
$body = new \Autodesk\Forge\Client\Model\CreateFolder(); // \Autodesk\Forge\Client\Model\CreateFolder | describe the folder to be created

try {
$apiInstance->postFolder($body);
$apiInstance->postFolder($project_id, $body);
} catch (Exception $e) {
echo 'Exception when calling FoldersApi->postFolder: ', $e->getMessage(), PHP_EOL;
}
Expand All @@ -301,6 +301,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **string**| the `project id` |
**body** | [**\Autodesk\Forge\Client\Model\CreateFolder**](../Model/\Autodesk\Forge\Client\Model\CreateFolder.md)| describe the folder to be created |

### Return type
Expand Down
19 changes: 16 additions & 3 deletions lib/Api/FoldersApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,9 @@ public function getFolderRelationshipsRefsWithHttpInfo($project_id, $folder_id,
* @throws \Autodesk\Forge\Client\ApiException on non-2xx response
* @return void
*/
public function postFolder($body)
public function postFolder($project_id, $body)
{
list($response) = $this->postFolderWithHttpInfo($body);
list($response) = $this->postFolderWithHttpInfo($project_id, $body);
return $response;
}

Expand All @@ -747,8 +747,12 @@ public function postFolder($body)
* @throws \Autodesk\Forge\Client\ApiException on non-2xx response
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function postFolderWithHttpInfo($body)
public function postFolderWithHttpInfo($project_id, $body)
{
// verify the required parameter 'project_id' is set
if ($project_id === null) {
throw new \InvalidArgumentException('Missing the required parameter $project_id when calling postFolder');
}
// verify the required parameter 'body' is set
if ($body === null) {
throw new \InvalidArgumentException('Missing the required parameter $body when calling postFolder');
Expand All @@ -765,6 +769,15 @@ public function postFolderWithHttpInfo($body)
}
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/vnd.api+json']);

// path params
if ($project_id !== null) {
$resourcePath = str_replace(
"{" . "project_id" . "}",
$this->apiClient->getSerializer()->toPathValue($project_id),
$resourcePath
);
}

// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);

Expand Down