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

Commit 3d6fb2d

Browse files
committed
PATCH: fix model deserialization
1 parent 705f0d5 commit 3d6fb2d

File tree

9 files changed

+7
-41
lines changed

9 files changed

+7
-41
lines changed

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ Name | Type | Description | Notes
889889
890890
Create a document
891891

892-
Create a document. If the document is one of {'DAE', 'DXF', 'POINT_CLOUD', 'IFC', 'DWG', 'BFX', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
892+
Create a document. If the document is one of {'DXF', 'DAE', 'OBJ', 'BFX', 'IFC', 'DWG', 'GLTF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
893893

894894
### Example
895895

docs/Model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Name | Type | Description | Notes
2020
**gltfFile** | **String** | | [readonly]
2121
**bvhTreeFile** | **String** | | [readonly]
2222
**previewFile** | **String** | | [readonly]
23-
**viewer360File** | **String** | DEPRECATED: Use 'preview_file' instead. |
23+
**viewer360File** | **String** | DEPRECATED: Use 'preview_file' instead. | [readonly]
2424
**xktFile** | **String** | | [readonly]
2525
**projectId** | **Number** | | [readonly]
2626
**worldPosition** | **[Number]** | [x,y,z] array of the position of the local_placement in world coordinates | [optional]

docs/ModelRequest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**name** | **String** | | [optional]
88
**source** | **String** | | [optional]
9-
**viewer360File** | **File** | DEPRECATED: Use 'preview_file' instead. |
109
**worldPosition** | **[Number]** | [x,y,z] array of the position of the local_placement in world coordinates | [optional]
1110
**sizeRatio** | **Number** | How many meters a unit represents | [optional]
1211
**archived** | **Boolean** | | [optional]

docs/PatchedModelRequest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**name** | **String** | | [optional]
88
**source** | **String** | | [optional]
9-
**viewer360File** | **File** | DEPRECATED: Use 'preview_file' instead. | [optional]
109
**worldPosition** | **[Number]** | [x,y,z] array of the position of the local_placement in world coordinates | [optional]
1110
**sizeRatio** | **Number** | How many meters a unit represents | [optional]
1211
**archived** | **Boolean** | | [optional]

src/api/CollaborationApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ export default class CollaborationApi {
800800

801801
/**
802802
* Create a document
803-
* Create a document. If the document is one of {'DAE', 'DXF', 'POINT_CLOUD', 'IFC', 'DWG', 'BFX', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
803+
* Create a document. If the document is one of {'DXF', 'DAE', 'OBJ', 'BFX', 'IFC', 'DWG', 'GLTF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
804804
* @param {Number} cloudPk A unique integer value identifying this cloud.
805805
* @param {Number} projectPk A unique integer value identifying this project.
806806
* @param {String} name Shown name of the file
@@ -868,7 +868,7 @@ export default class CollaborationApi {
868868

869869
/**
870870
* Create a document
871-
* Create a document. If the document is one of {'DAE', 'DXF', 'POINT_CLOUD', 'IFC', 'DWG', 'BFX', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
871+
* Create a document. If the document is one of {'DXF', 'DAE', 'OBJ', 'BFX', 'IFC', 'DWG', 'GLTF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
872872
* @param {Number} cloudPk A unique integer value identifying this cloud.
873873
* @param {Number} projectPk A unique integer value identifying this project.
874874
* @param {String} name Shown name of the file

src/model/ModelRequest.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,18 @@ class ModelRequest {
2222
/**
2323
* Constructs a new <code>ModelRequest</code>.
2424
* @alias module:model/ModelRequest
25-
* @param viewer360File {File} DEPRECATED: Use 'preview_file' instead.
2625
*/
27-
constructor(viewer360File) {
26+
constructor() {
2827

29-
ModelRequest.initialize(this, viewer360File);
28+
ModelRequest.initialize(this);
3029
}
3130

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

4139
/**
@@ -55,9 +53,6 @@ class ModelRequest {
5553
if (data.hasOwnProperty('source')) {
5654
obj['source'] = ApiClient.convertToType(data['source'], 'String');
5755
}
58-
if (data.hasOwnProperty('viewer_360_file')) {
59-
obj['viewer_360_file'] = ApiClient.convertToType(data['viewer_360_file'], File);
60-
}
6156
if (data.hasOwnProperty('world_position')) {
6257
obj['world_position'] = ApiClient.convertToType(data['world_position'], ['Number']);
6358
}
@@ -93,12 +88,6 @@ ModelRequest.prototype['name'] = undefined;
9388
*/
9489
ModelRequest.prototype['source'] = undefined;
9590

96-
/**
97-
* DEPRECATED: Use 'preview_file' instead.
98-
* @member {File} viewer_360_file
99-
*/
100-
ModelRequest.prototype['viewer_360_file'] = undefined;
101-
10291
/**
10392
* [x,y,z] array of the position of the local_placement in world coordinates
10493
* @member {Array.<Number>} world_position

src/model/PatchedModelRequest.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ class PatchedModelRequest {
5353
if (data.hasOwnProperty('source')) {
5454
obj['source'] = ApiClient.convertToType(data['source'], 'String');
5555
}
56-
if (data.hasOwnProperty('viewer_360_file')) {
57-
obj['viewer_360_file'] = ApiClient.convertToType(data['viewer_360_file'], File);
58-
}
5956
if (data.hasOwnProperty('world_position')) {
6057
obj['world_position'] = ApiClient.convertToType(data['world_position'], ['Number']);
6158
}
@@ -91,12 +88,6 @@ PatchedModelRequest.prototype['name'] = undefined;
9188
*/
9289
PatchedModelRequest.prototype['source'] = undefined;
9390

94-
/**
95-
* DEPRECATED: Use 'preview_file' instead.
96-
* @member {File} viewer_360_file
97-
*/
98-
PatchedModelRequest.prototype['viewer_360_file'] = undefined;
99-
10091
/**
10192
* [x,y,z] array of the position of the local_placement in world coordinates
10293
* @member {Array.<Number>} world_position

test/model/ModelRequest.spec.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
//expect(instance).to.be();
6767
});
6868

69-
it('should have the property viewer360File (base name: "viewer_360_file")', function() {
70-
// uncomment below and update the code to test the property viewer360File
71-
//var instance = new bimdata.ModelRequest();
72-
//expect(instance).to.be();
73-
});
74-
7569
it('should have the property worldPosition (base name: "world_position")', function() {
7670
// uncomment below and update the code to test the property worldPosition
7771
//var instance = new bimdata.ModelRequest();

test/model/PatchedModelRequest.spec.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
//expect(instance).to.be();
6767
});
6868

69-
it('should have the property viewer360File (base name: "viewer_360_file")', function() {
70-
// uncomment below and update the code to test the property viewer360File
71-
//var instance = new bimdata.PatchedModelRequest();
72-
//expect(instance).to.be();
73-
});
74-
7569
it('should have the property worldPosition (base name: "world_position")', function() {
7670
// uncomment below and update the code to test the property worldPosition
7771
//var instance = new bimdata.PatchedModelRequest();

0 commit comments

Comments
 (0)