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

Commit 94fe833

Browse files
committed
PATCH: project field of createDocument is no more mandatory
1 parent ff85586 commit 94fe833

4 files changed

Lines changed: 14 additions & 34 deletions

File tree

docs/CollaborationApi.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Name | Type | Description | Notes
353353

354354
## createDocument
355355

356-
> Document createDocument(cloudPk, projectPk, project, name, file, opts)
356+
> Document createDocument(cloudPk, projectPk, name, file, opts)
357357
358358
Create a document
359359

@@ -379,7 +379,6 @@ client_credentials.accessToken = 'YOUR ACCESS TOKEN';
379379
let apiInstance = new bimdata.CollaborationApi();
380380
let cloudPk = "cloudPk_example"; // String |
381381
let projectPk = "projectPk_example"; // String |
382-
let project = 56; // Number |
383382
let name = "name_example"; // String | Shown name of the file
384383
let file = "/path/to/file"; // File |
385384
let opts = {
@@ -390,7 +389,7 @@ let opts = {
390389
'description': "description_example", // String | Description of the file
391390
'size': 56 // Number | Size of the file.
392391
};
393-
apiInstance.createDocument(cloudPk, projectPk, project, name, file, opts).then((data) => {
392+
apiInstance.createDocument(cloudPk, projectPk, name, file, opts).then((data) => {
394393
console.log('API called successfully. Returned data: ' + data);
395394
}, (error) => {
396395
console.error(error);
@@ -405,7 +404,6 @@ Name | Type | Description | Notes
405404
------------- | ------------- | ------------- | -------------
406405
**cloudPk** | **String**| |
407406
**projectPk** | **String**| |
408-
**project** | **Number**| |
409407
**name** | **String**| Shown name of the file |
410408
**file** | **File**| |
411409
**parent** | **Number**| | [optional]
@@ -1141,7 +1139,7 @@ Name | Type | Description | Notes
11411139

11421140
## fullUpdateDocument
11431141

1144-
> Document fullUpdateDocument(cloudPk, id, projectPk, project, name, file, opts)
1142+
> Document fullUpdateDocument(cloudPk, id, projectPk, name, file, opts)
11451143
11461144
Update all fields of the document
11471145

@@ -1168,7 +1166,6 @@ let apiInstance = new bimdata.CollaborationApi();
11681166
let cloudPk = "cloudPk_example"; // String |
11691167
let id = 56; // Number | A unique integer value identifying this document.
11701168
let projectPk = "projectPk_example"; // String |
1171-
let project = 56; // Number |
11721169
let name = "name_example"; // String | Shown name of the file
11731170
let file = "/path/to/file"; // File |
11741171
let opts = {
@@ -1179,7 +1176,7 @@ let opts = {
11791176
'description': "description_example", // String | Description of the file
11801177
'size': 56 // Number | Size of the file.
11811178
};
1182-
apiInstance.fullUpdateDocument(cloudPk, id, projectPk, project, name, file, opts).then((data) => {
1179+
apiInstance.fullUpdateDocument(cloudPk, id, projectPk, name, file, opts).then((data) => {
11831180
console.log('API called successfully. Returned data: ' + data);
11841181
}, (error) => {
11851182
console.error(error);
@@ -1195,7 +1192,6 @@ Name | Type | Description | Notes
11951192
**cloudPk** | **String**| |
11961193
**id** | **Number**| A unique integer value identifying this document. |
11971194
**projectPk** | **String**| |
1198-
**project** | **Number**| |
11991195
**name** | **String**| Shown name of the file |
12001196
**file** | **File**| |
12011197
**parent** | **Number**| | [optional]

docs/Document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**parent** | **Number** | | [optional]
99
**parentId** | **Number** | | [optional]
1010
**creator** | **Number** | | [optional]
11-
**project** | **Number** | |
11+
**project** | **Number** | | [optional] [readonly]
1212
**name** | **String** | Shown name of the file |
1313
**fileName** | **String** | Full name of the file | [optional]
1414
**description** | **String** | Description of the file | [optional]

src/api/CollaborationApi.js

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ export default class CollaborationApi {
324324
* RCreate a document. If the document is an IFC, an IFC model will be created and attached to this document Required scopes: document:write
325325
* @param {String} cloudPk
326326
* @param {String} projectPk
327-
* @param {Number} project
328327
* @param {String} name Shown name of the file
329328
* @param {File} file
330329
* @param {Object} opts Optional parameters
@@ -336,7 +335,7 @@ export default class CollaborationApi {
336335
* @param {Number} opts.size Size of the file.
337336
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Document} and HTTP response
338337
*/
339-
createDocumentWithHttpInfo(cloudPk, projectPk, project, name, file, opts) {
338+
createDocumentWithHttpInfo(cloudPk, projectPk, name, file, opts) {
340339
opts = opts || {};
341340
let postBody = null;
342341
// verify the required parameter 'cloudPk' is set
@@ -347,10 +346,6 @@ export default class CollaborationApi {
347346
if (projectPk === undefined || projectPk === null) {
348347
throw new Error("Missing the required parameter 'projectPk' when calling createDocument");
349348
}
350-
// verify the required parameter 'project' is set
351-
if (project === undefined || project === null) {
352-
throw new Error("Missing the required parameter 'project' when calling createDocument");
353-
}
354349
// verify the required parameter 'name' is set
355350
if (name === undefined || name === null) {
356351
throw new Error("Missing the required parameter 'name' when calling createDocument");
@@ -372,7 +367,6 @@ export default class CollaborationApi {
372367
'parent': opts['parent'],
373368
'parent_id': opts['parentId'],
374369
'creator': opts['creator'],
375-
'project': project,
376370
'name': name,
377371
'file_name': opts['fileName'],
378372
'description': opts['description'],
@@ -396,7 +390,6 @@ export default class CollaborationApi {
396390
* RCreate a document. If the document is an IFC, an IFC model will be created and attached to this document Required scopes: document:write
397391
* @param {String} cloudPk
398392
* @param {String} projectPk
399-
* @param {Number} project
400393
* @param {String} name Shown name of the file
401394
* @param {File} file
402395
* @param {Object} opts Optional parameters
@@ -408,8 +401,8 @@ export default class CollaborationApi {
408401
* @param {Number} opts.size Size of the file.
409402
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Document}
410403
*/
411-
createDocument(cloudPk, projectPk, project, name, file, opts) {
412-
return this.createDocumentWithHttpInfo(cloudPk, projectPk, project, name, file, opts)
404+
createDocument(cloudPk, projectPk, name, file, opts) {
405+
return this.createDocumentWithHttpInfo(cloudPk, projectPk, name, file, opts)
413406
.then(function(response_and_data) {
414407
return response_and_data.data;
415408
});
@@ -1126,7 +1119,6 @@ export default class CollaborationApi {
11261119
* @param {String} cloudPk
11271120
* @param {Number} id A unique integer value identifying this document.
11281121
* @param {String} projectPk
1129-
* @param {Number} project
11301122
* @param {String} name Shown name of the file
11311123
* @param {File} file
11321124
* @param {Object} opts Optional parameters
@@ -1138,7 +1130,7 @@ export default class CollaborationApi {
11381130
* @param {Number} opts.size Size of the file.
11391131
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Document} and HTTP response
11401132
*/
1141-
fullUpdateDocumentWithHttpInfo(cloudPk, id, projectPk, project, name, file, opts) {
1133+
fullUpdateDocumentWithHttpInfo(cloudPk, id, projectPk, name, file, opts) {
11421134
opts = opts || {};
11431135
let postBody = null;
11441136
// verify the required parameter 'cloudPk' is set
@@ -1153,10 +1145,6 @@ export default class CollaborationApi {
11531145
if (projectPk === undefined || projectPk === null) {
11541146
throw new Error("Missing the required parameter 'projectPk' when calling fullUpdateDocument");
11551147
}
1156-
// verify the required parameter 'project' is set
1157-
if (project === undefined || project === null) {
1158-
throw new Error("Missing the required parameter 'project' when calling fullUpdateDocument");
1159-
}
11601148
// verify the required parameter 'name' is set
11611149
if (name === undefined || name === null) {
11621150
throw new Error("Missing the required parameter 'name' when calling fullUpdateDocument");
@@ -1179,7 +1167,6 @@ export default class CollaborationApi {
11791167
'parent': opts['parent'],
11801168
'parent_id': opts['parentId'],
11811169
'creator': opts['creator'],
1182-
'project': project,
11831170
'name': name,
11841171
'file_name': opts['fileName'],
11851172
'description': opts['description'],
@@ -1204,7 +1191,6 @@ export default class CollaborationApi {
12041191
* @param {String} cloudPk
12051192
* @param {Number} id A unique integer value identifying this document.
12061193
* @param {String} projectPk
1207-
* @param {Number} project
12081194
* @param {String} name Shown name of the file
12091195
* @param {File} file
12101196
* @param {Object} opts Optional parameters
@@ -1216,8 +1202,8 @@ export default class CollaborationApi {
12161202
* @param {Number} opts.size Size of the file.
12171203
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Document}
12181204
*/
1219-
fullUpdateDocument(cloudPk, id, projectPk, project, name, file, opts) {
1220-
return this.fullUpdateDocumentWithHttpInfo(cloudPk, id, projectPk, project, name, file, opts)
1205+
fullUpdateDocument(cloudPk, id, projectPk, name, file, opts) {
1206+
return this.fullUpdateDocumentWithHttpInfo(cloudPk, id, projectPk, name, file, opts)
12211207
.then(function(response_and_data) {
12221208
return response_and_data.data;
12231209
});

src/model/Document.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,19 @@ class Document {
2222
/**
2323
* Constructs a new <code>Document</code>.
2424
* @alias module:model/Document
25-
* @param project {Number}
2625
* @param name {String} Shown name of the file
2726
*/
28-
constructor(project, name) {
27+
constructor(name) {
2928

30-
Document.initialize(this, project, name);
29+
Document.initialize(this, name);
3130
}
3231

3332
/**
3433
* Initializes the fields of this object.
3534
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
3635
* Only for internal use.
3736
*/
38-
static initialize(obj, project, name) {
39-
obj['project'] = project;
37+
static initialize(obj, name) {
4038
obj['name'] = name;
4139
}
4240

0 commit comments

Comments
 (0)