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

Commit cc7c747

Browse files
committed
PATCH: remove parent from document serialization (#521)
1 parent ddb3165 commit cc7c747

3 files changed

Lines changed: 3 additions & 21 deletions

File tree

docs/Document.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **Number** | | [readonly]
8-
**parent** | [**Folder**](Folder.md) | | [readonly]
98
**parentId** | **Number** | | [optional]
109
**creator** | **Number** | | [optional]
1110
**project** | **Number** | | [readonly]

src/model/Document.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313

1414
import ApiClient from '../ApiClient';
15-
import Folder from './Folder';
1615
import Tag from './Tag';
1716

1817
/**
@@ -25,7 +24,6 @@ class Document {
2524
* Constructs a new <code>Document</code>.
2625
* @alias module:model/Document
2726
* @param id {Number}
28-
* @param parent {module:model/Folder}
2927
* @param project {Number}
3028
* @param name {String} Shown name of the file
3129
* @param file {String}
@@ -36,19 +34,18 @@ class Document {
3634
* @param ifcId {Number} DEPRECATED: Use 'model_id' instead.
3735
* @param userPermission {module:model/Document.UserPermissionEnum} Aggregate of group user permissions and folder default permission
3836
*/
39-
constructor(id, parent, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission) {
37+
constructor(id, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission) {
4038

41-
Document.initialize(this, id, parent, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission);
39+
Document.initialize(this, id, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission);
4240
}
4341

4442
/**
4543
* Initializes the fields of this object.
4644
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
4745
* Only for internal use.
4846
*/
49-
static initialize(obj, id, parent, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission) {
47+
static initialize(obj, id, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission) {
5048
obj['id'] = id;
51-
obj['parent'] = parent;
5249
obj['project'] = project;
5350
obj['name'] = name;
5451
obj['file'] = file;
@@ -74,9 +71,6 @@ class Document {
7471
if (data.hasOwnProperty('id')) {
7572
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
7673
}
77-
if (data.hasOwnProperty('parent')) {
78-
obj['parent'] = ApiClient.convertToType(data['parent'], Folder);
79-
}
8074
if (data.hasOwnProperty('parent_id')) {
8175
obj['parent_id'] = ApiClient.convertToType(data['parent_id'], 'Number');
8276
}
@@ -131,11 +125,6 @@ class Document {
131125
*/
132126
Document.prototype['id'] = undefined;
133127

134-
/**
135-
* @member {module:model/Folder} parent
136-
*/
137-
Document.prototype['parent'] = undefined;
138-
139128
/**
140129
* @member {Number} parent_id
141130
*/

test/model/Document.spec.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@
6060
//expect(instance).to.be();
6161
});
6262

63-
it('should have the property parent (base name: "parent")', function() {
64-
// uncomment below and update the code to test the property parent
65-
//var instance = new bimdata.Document();
66-
//expect(instance).to.be();
67-
});
68-
6963
it('should have the property parentId (base name: "parent_id")', function() {
7064
// uncomment below and update the code to test the property parentId
7165
//var instance = new bimdata.Document();

0 commit comments

Comments
 (0)