Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit e60a712

Browse files
committed
PATCH: fix createDocument response missing
1 parent 29a1d87 commit e60a712

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/CollaborationApi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ Name | Type | Description | Notes
815815

816816
## createDocument
817817

818-
> createDocument(cloudPk, projectPk, name, file, opts)
818+
> Document createDocument(cloudPk, projectPk, name, file, opts)
819819
820820
Create a document
821821

@@ -858,8 +858,8 @@ let opts = {
858858
'modelSource': "modelSource_example", // String | Define the model.source field if the upload is a Model (IFC, PDF, DWG...)
859859
'ifcSource': "ifcSource_example" // String | DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...)
860860
};
861-
apiInstance.createDocument(cloudPk, projectPk, name, file, opts).then(() => {
862-
console.log('API called successfully.');
861+
apiInstance.createDocument(cloudPk, projectPk, name, file, opts).then((data) => {
862+
console.log('API called successfully. Returned data: ' + data);
863863
}, (error) => {
864864
console.error(error);
865865
});
@@ -886,7 +886,7 @@ Name | Type | Description | Notes
886886

887887
### Return type
888888

889-
null (empty response body)
889+
[**Document**](Document.md)
890890

891891
### Authorization
892892

@@ -895,7 +895,7 @@ null (empty response body)
895895
### HTTP request headers
896896

897897
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
898-
- **Accept**: Not defined
898+
- **Accept**: application/json
899899

900900

901901
## createFolder

src/api/CollaborationApi.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ export default class CollaborationApi {
764764
* @param {Number} opts.size Size of the file.
765765
* @param {module:model/String} opts.modelSource Define the model.source field if the upload is a Model (IFC, PDF, DWG...)
766766
* @param {module:model/String} opts.ifcSource DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...)
767-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
767+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Document} and HTTP response
768768
*/
769769
createDocumentWithHttpInfo(cloudPk, projectPk, name, file, opts) {
770770
opts = opts || {};
@@ -809,8 +809,8 @@ export default class CollaborationApi {
809809

810810
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
811811
let contentTypes = ['multipart/form-data', 'application/x-www-form-urlencoded'];
812-
let accepts = [];
813-
let returnType = null;
812+
let accepts = ['application/json'];
813+
let returnType = Document;
814814
return this.apiClient.callApi(
815815
'/cloud/{cloud_pk}/project/{project_pk}/document', 'POST',
816816
pathParams, queryParams, headerParams, formParams, postBody,
@@ -834,7 +834,7 @@ export default class CollaborationApi {
834834
* @param {Number} opts.size Size of the file.
835835
* @param {module:model/String} opts.modelSource Define the model.source field if the upload is a Model (IFC, PDF, DWG...)
836836
* @param {module:model/String} opts.ifcSource DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...)
837-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
837+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Document}
838838
*/
839839
createDocument(cloudPk, projectPk, name, file, opts) {
840840
return this.createDocumentWithHttpInfo(cloudPk, projectPk, name, file, opts)

0 commit comments

Comments
 (0)