Skip to content

Commit 9edfcb5

Browse files
committed
MINOR: Remove folder groups and history fields form DMS-Tree(#599)
* optimize some routes and remove group_permissions from dms-tree * add more tests * remove history from dms-tree * typo * fix documentation * restore features prefetch * remove useless prefetch * fix prefetch * remove useless prefetch
1 parent 9184a42 commit 9edfcb5

20 files changed

Lines changed: 80 additions & 539 deletions

.openapi-generator/FILES

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ bimdata_api_client/model/layer_element_request.py
8787
bimdata_api_client/model/layer_request.py
8888
bimdata_api_client/model/line.py
8989
bimdata_api_client/model/line_request.py
90-
bimdata_api_client/model/marketplace_app.py
9190
bimdata_api_client/model/marketplace_app_image.py
92-
bimdata_api_client/model/marketplace_app_image_request.py
93-
bimdata_api_client/model/marketplace_app_request.py
91+
bimdata_api_client/model/marketplace_app_light.py
92+
bimdata_api_client/model/marketplace_app_light_request.py
9493
bimdata_api_client/model/material.py
9594
bimdata_api_client/model/material_list_component.py
9695
bimdata_api_client/model/material_list_component_request.py
@@ -340,10 +339,9 @@ docs/LayerElementRequest.md
340339
docs/LayerRequest.md
341340
docs/Line.md
342341
docs/LineRequest.md
343-
docs/MarketplaceApp.md
344342
docs/MarketplaceAppImage.md
345-
docs/MarketplaceAppImageRequest.md
346-
docs/MarketplaceAppRequest.md
343+
docs/MarketplaceAppLight.md
344+
docs/MarketplaceAppLightRequest.md
347345
docs/Material.md
348346
docs/MaterialListComponent.md
349347
docs/MaterialListComponentRequest.md
@@ -597,10 +595,9 @@ test/test_layer_element_request.py
597595
test/test_layer_request.py
598596
test/test_line.py
599597
test/test_line_request.py
600-
test/test_marketplace_app.py
601598
test/test_marketplace_app_image.py
602-
test/test_marketplace_app_image_request.py
603-
test/test_marketplace_app_request.py
599+
test/test_marketplace_app_light.py
600+
test/test_marketplace_app_light_request.py
604601
test/test_material.py
605602
test/test_material_list_component.py
606603
test/test_material_list_component_request.py

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,9 @@ Class | Method | HTTP request | Description
733733
- [LayerRequest](docs/LayerRequest.md)
734734
- [Line](docs/Line.md)
735735
- [LineRequest](docs/LineRequest.md)
736-
- [MarketplaceApp](docs/MarketplaceApp.md)
737736
- [MarketplaceAppImage](docs/MarketplaceAppImage.md)
738-
- [MarketplaceAppImageRequest](docs/MarketplaceAppImageRequest.md)
739-
- [MarketplaceAppRequest](docs/MarketplaceAppRequest.md)
737+
- [MarketplaceAppLight](docs/MarketplaceAppLight.md)
738+
- [MarketplaceAppLightRequest](docs/MarketplaceAppLightRequest.md)
740739
- [Material](docs/Material.md)
741740
- [MaterialListComponent](docs/MaterialListComponent.md)
742741
- [MaterialListComponentRequest](docs/MaterialListComponentRequest.md)

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8240,7 +8240,7 @@ def create_document(
82408240
):
82418241
"""Create a document # noqa: E501
82428242

8243-
Create a document. If the document is one of {'PDF', 'GLTF', 'BFX', 'DAE', 'POINT_CLOUD', 'IFC', 'DXF', 'OBJ', 'DWG'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
8243+
Create a document. If the document is one of {'DAE', 'DWG', 'OBJ', 'DXF', 'PDF', 'IFC', 'GLTF', 'BFX', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
82448244
This method makes a synchronous HTTP request by default. To make an
82458245
asynchronous HTTP request, please pass async_req=True
82468246

bimdata_api_client/model/cloud.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232

3333
def lazy_import():
3434
from bimdata_api_client.model.feature import Feature
35-
from bimdata_api_client.model.marketplace_app import MarketplaceApp
35+
from bimdata_api_client.model.marketplace_app_light import MarketplaceAppLight
3636
from bimdata_api_client.model.organization import Organization
3737
from bimdata_api_client.model.user import User
3838
globals()['Feature'] = Feature
39-
globals()['MarketplaceApp'] = MarketplaceApp
39+
globals()['MarketplaceAppLight'] = MarketplaceAppLight
4040
globals()['Organization'] = Organization
4141
globals()['User'] = User
4242

@@ -100,7 +100,7 @@ def openapi_types():
100100
'id': (int,), # noqa: E501
101101
'name': (str,), # noqa: E501
102102
'features': ([Feature],), # noqa: E501
103-
'marketplace_apps': ([MarketplaceApp],), # noqa: E501
103+
'marketplace_apps': ([MarketplaceAppLight],), # noqa: E501
104104
'organization': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
105105
'creator': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
106106
'creator_app': (str,), # noqa: E501
@@ -152,7 +152,7 @@ def _from_openapi_data(cls, id, name, features, marketplace_apps, organization,
152152
id (int):
153153
name (str): Name of the cloud
154154
features ([Feature]):
155-
marketplace_apps ([MarketplaceApp]):
155+
marketplace_apps ([MarketplaceAppLight]):
156156
organization (bool, date, datetime, dict, float, int, list, str, none_type):
157157
creator (bool, date, datetime, dict, float, int, list, str, none_type):
158158
creator_app (str):

bimdata_api_client/model/marketplace_app.py renamed to bimdata_api_client/model/marketplace_app_light.py

Lines changed: 10 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@
3333
def lazy_import():
3434
from bimdata_api_client.model.marketplace_app_image import MarketplaceAppImage
3535
from bimdata_api_client.model.public_organization import PublicOrganization
36-
from bimdata_api_client.model.user import User
3736
globals()['MarketplaceAppImage'] = MarketplaceAppImage
3837
globals()['PublicOrganization'] = PublicOrganization
39-
globals()['User'] = User
4038

4139

42-
class MarketplaceApp(ModelNormal):
40+
class MarketplaceAppLight(ModelNormal):
4341
"""NOTE: This class is auto generated by OpenAPI Generator.
4442
Ref: https://openapi-generator.tech
4543
@@ -70,18 +68,6 @@ class MarketplaceApp(ModelNormal):
7068
('name',): {
7169
'max_length': 256,
7270
},
73-
('short_description',): {
74-
'max_length': 130,
75-
},
76-
('activation_webhook_url',): {
77-
'max_length': 1024,
78-
},
79-
('post_activation_redirect_uri',): {
80-
'max_length': 1024,
81-
},
82-
('settings_url',): {
83-
'max_length': 1024,
84-
},
8571
}
8672

8773
@cached_property
@@ -109,19 +95,9 @@ def openapi_types():
10995
return {
11096
'id': (int,), # noqa: E501
11197
'name': (str,), # noqa: E501
112-
'short_description': (str,), # noqa: E501
113-
'long_description': (str,), # noqa: E501
114-
'creator': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
115-
'scopes': ([str],), # noqa: E501
116-
'is_public': (bool,), # noqa: E501
117-
'images': ([MarketplaceAppImage],), # noqa: E501
11898
'organization': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
119-
'activation_webhook_url': (str, none_type,), # noqa: E501
120-
'post_activation_redirect_uri': (str, none_type,), # noqa: E501
99+
'images': ([MarketplaceAppImage],), # noqa: E501
121100
'viewer_plugins_urls': ([str], none_type,), # noqa: E501
122-
'settings_url': (str, none_type,), # noqa: E501
123-
'tags': ([str],), # noqa: E501
124-
'logo': (str, none_type,), # noqa: E501
125101
'file': (str, none_type,), # noqa: E501
126102
}
127103

@@ -133,48 +109,30 @@ def discriminator():
133109
attribute_map = {
134110
'id': 'id', # noqa: E501
135111
'name': 'name', # noqa: E501
136-
'short_description': 'short_description', # noqa: E501
137-
'long_description': 'long_description', # noqa: E501
138-
'creator': 'creator', # noqa: E501
139-
'scopes': 'scopes', # noqa: E501
140-
'is_public': 'is_public', # noqa: E501
141-
'images': 'images', # noqa: E501
142112
'organization': 'organization', # noqa: E501
143-
'activation_webhook_url': 'activation_webhook_url', # noqa: E501
144-
'post_activation_redirect_uri': 'post_activation_redirect_uri', # noqa: E501
113+
'images': 'images', # noqa: E501
145114
'viewer_plugins_urls': 'viewer_plugins_urls', # noqa: E501
146-
'settings_url': 'settings_url', # noqa: E501
147-
'tags': 'tags', # noqa: E501
148-
'logo': 'logo', # noqa: E501
149115
'file': 'file', # noqa: E501
150116
}
151117

152118
read_only_vars = {
153119
'id', # noqa: E501
154-
'creator', # noqa: E501
155-
'scopes', # noqa: E501
156-
'is_public', # noqa: E501
157-
'images', # noqa: E501
158120
'organization', # noqa: E501
121+
'images', # noqa: E501
159122
}
160123

161124
_composed_schemas = {}
162125

163126
@classmethod
164127
@convert_js_args_to_python_args
165-
def _from_openapi_data(cls, id, name, short_description, long_description, creator, scopes, is_public, images, organization, *args, **kwargs): # noqa: E501
166-
"""MarketplaceApp - a model defined in OpenAPI
128+
def _from_openapi_data(cls, id, name, organization, images, *args, **kwargs): # noqa: E501
129+
"""MarketplaceAppLight - a model defined in OpenAPI
167130
168131
Args:
169132
id (int):
170133
name (str):
171-
short_description (str):
172-
long_description (str):
173-
creator (bool, date, datetime, dict, float, int, list, str, none_type):
174-
scopes ([str]):
175-
is_public (bool):
176-
images ([MarketplaceAppImage]):
177134
organization (bool, date, datetime, dict, float, int, list, str, none_type):
135+
images ([MarketplaceAppImage]):
178136
179137
Keyword Args:
180138
_check_type (bool): if True, values for parameters in openapi_types
@@ -207,12 +165,7 @@ def _from_openapi_data(cls, id, name, short_description, long_description, creat
207165
Animal class but this time we won't travel
208166
through its discriminator because we passed in
209167
_visited_composed_classes = (Animal,)
210-
activation_webhook_url (str, none_type): [optional] # noqa: E501
211-
post_activation_redirect_uri (str, none_type): [optional] # noqa: E501
212168
viewer_plugins_urls ([str], none_type): [optional] # noqa: E501
213-
settings_url (str, none_type): this URL will be called with query params ?cloud_id=. [optional] # noqa: E501
214-
tags ([str]): [optional] # noqa: E501
215-
logo (str, none_type): [optional] # noqa: E501
216169
file (str, none_type): [optional] # noqa: E501
217170
"""
218171

@@ -243,13 +196,8 @@ def _from_openapi_data(cls, id, name, short_description, long_description, creat
243196

244197
self.id = id
245198
self.name = name
246-
self.short_description = short_description
247-
self.long_description = long_description
248-
self.creator = creator
249-
self.scopes = scopes
250-
self.is_public = is_public
251-
self.images = images
252199
self.organization = organization
200+
self.images = images
253201
for var_name, var_value in kwargs.items():
254202
if var_name not in self.attribute_map and \
255203
self._configuration is not None and \
@@ -270,12 +218,10 @@ def _from_openapi_data(cls, id, name, short_description, long_description, creat
270218
])
271219

272220
@convert_js_args_to_python_args
273-
def __init__(self, name, short_description, long_description, *args, **kwargs): # noqa: E501
274-
"""MarketplaceApp - a model defined in OpenAPI
221+
def __init__(self, name, *args, **kwargs): # noqa: E501
222+
"""MarketplaceAppLight - a model defined in OpenAPI
275223
276224
name (str):
277-
short_description (str):
278-
long_description (str):
279225
Keyword Args:
280226
_check_type (bool): if True, values for parameters in openapi_types
281227
will be type checked and a TypeError will be
@@ -307,12 +253,7 @@ def __init__(self, name, short_description, long_description, *args, **kwargs):
307253
Animal class but this time we won't travel
308254
through its discriminator because we passed in
309255
_visited_composed_classes = (Animal,)
310-
activation_webhook_url (str, none_type): [optional] # noqa: E501
311-
post_activation_redirect_uri (str, none_type): [optional] # noqa: E501
312256
viewer_plugins_urls ([str], none_type): [optional] # noqa: E501
313-
settings_url (str, none_type): this URL will be called with query params ?cloud_id=. [optional] # noqa: E501
314-
tags ([str]): [optional] # noqa: E501
315-
logo (str, none_type): [optional] # noqa: E501
316257
file (str, none_type): [optional] # noqa: E501
317258
"""
318259

@@ -340,8 +281,6 @@ def __init__(self, name, short_description, long_description, *args, **kwargs):
340281
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
341282

342283
self.name = name
343-
self.short_description = short_description
344-
self.long_description = long_description
345284
for var_name, var_value in kwargs.items():
346285
if var_name not in self.attribute_map and \
347286
self._configuration is not None and \

bimdata_api_client/model/marketplace_app_image_request.py renamed to bimdata_api_client/model/marketplace_app_light_request.py

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333

34-
class MarketplaceAppImageRequest(ModelNormal):
34+
class MarketplaceAppLightRequest(ModelNormal):
3535
"""NOTE: This class is auto generated by OpenAPI Generator.
3636
Ref: https://openapi-generator.tech
3737
@@ -59,6 +59,10 @@ class MarketplaceAppImageRequest(ModelNormal):
5959
}
6060

6161
validations = {
62+
('name',): {
63+
'max_length': 256,
64+
'min_length': 1,
65+
},
6266
}
6367

6468
@cached_property
@@ -82,7 +86,9 @@ def openapi_types():
8286
and the value is attribute type.
8387
"""
8488
return {
85-
'image': (file_type,), # noqa: E501
89+
'name': (str,), # noqa: E501
90+
'viewer_plugins_urls': ([str], none_type,), # noqa: E501
91+
'file': (file_type, none_type,), # noqa: E501
8692
}
8793

8894
@cached_property
@@ -91,7 +97,9 @@ def discriminator():
9197

9298

9399
attribute_map = {
94-
'image': 'image', # noqa: E501
100+
'name': 'name', # noqa: E501
101+
'viewer_plugins_urls': 'viewer_plugins_urls', # noqa: E501
102+
'file': 'file', # noqa: E501
95103
}
96104

97105
read_only_vars = {
@@ -101,11 +109,11 @@ def discriminator():
101109

102110
@classmethod
103111
@convert_js_args_to_python_args
104-
def _from_openapi_data(cls, image, *args, **kwargs): # noqa: E501
105-
"""MarketplaceAppImageRequest - a model defined in OpenAPI
112+
def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501
113+
"""MarketplaceAppLightRequest - a model defined in OpenAPI
106114
107115
Args:
108-
image (file_type):
116+
name (str):
109117
110118
Keyword Args:
111119
_check_type (bool): if True, values for parameters in openapi_types
@@ -138,6 +146,8 @@ def _from_openapi_data(cls, image, *args, **kwargs): # noqa: E501
138146
Animal class but this time we won't travel
139147
through its discriminator because we passed in
140148
_visited_composed_classes = (Animal,)
149+
viewer_plugins_urls ([str], none_type): [optional] # noqa: E501
150+
file (file_type, none_type): [optional] # noqa: E501
141151
"""
142152

143153
_check_type = kwargs.pop('_check_type', True)
@@ -165,7 +175,7 @@ def _from_openapi_data(cls, image, *args, **kwargs): # noqa: E501
165175
self._configuration = _configuration
166176
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
167177

168-
self.image = image
178+
self.name = name
169179
for var_name, var_value in kwargs.items():
170180
if var_name not in self.attribute_map and \
171181
self._configuration is not None and \
@@ -186,11 +196,11 @@ def _from_openapi_data(cls, image, *args, **kwargs): # noqa: E501
186196
])
187197

188198
@convert_js_args_to_python_args
189-
def __init__(self, image, *args, **kwargs): # noqa: E501
190-
"""MarketplaceAppImageRequest - a model defined in OpenAPI
199+
def __init__(self, name, *args, **kwargs): # noqa: E501
200+
"""MarketplaceAppLightRequest - a model defined in OpenAPI
191201
192202
Args:
193-
image (file_type):
203+
name (str):
194204
195205
Keyword Args:
196206
_check_type (bool): if True, values for parameters in openapi_types
@@ -223,6 +233,8 @@ def __init__(self, image, *args, **kwargs): # noqa: E501
223233
Animal class but this time we won't travel
224234
through its discriminator because we passed in
225235
_visited_composed_classes = (Animal,)
236+
viewer_plugins_urls ([str], none_type): [optional] # noqa: E501
237+
file (file_type, none_type): [optional] # noqa: E501
226238
"""
227239

228240
_check_type = kwargs.pop('_check_type', True)
@@ -248,7 +260,7 @@ def __init__(self, image, *args, **kwargs): # noqa: E501
248260
self._configuration = _configuration
249261
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
250262

251-
self.image = image
263+
self.name = name
252264
for var_name, var_value in kwargs.items():
253265
if var_name not in self.attribute_map and \
254266
self._configuration is not None and \

0 commit comments

Comments
 (0)