Skip to content

Commit f855ec7

Browse files
committed
PATCH: fix create model serializer (#843)
1 parent 5b8e0ef commit f855ec7

File tree

6 files changed

+50
-50
lines changed

6 files changed

+50
-50
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8815,7 +8815,7 @@ def create_document(
88158815
):
88168816
"""Create a document # noqa: E501
88178817

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

bimdata_api_client/model/write_folder.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ def openapi_types():
107107
"""
108108
lazy_import()
109109
return {
110-
'nature': (str,), # noqa: E501
111-
'groups_permissions': ([GroupFolderRead],), # noqa: E501
112-
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
113-
'type': (str,), # noqa: E501
114110
'user_permission': (int,), # noqa: E501
115-
'updated_at': (datetime,), # noqa: E501
116111
'id': (int,), # noqa: E501
117-
'name': (str,), # noqa: E501
112+
'updated_at': (datetime,), # noqa: E501
118113
'created_at': (datetime,), # noqa: E501
119-
'default_permission': (int,), # noqa: E501
114+
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
115+
'groups_permissions': ([GroupFolderRead],), # noqa: E501
116+
'name': (str,), # noqa: E501
117+
'type': (str,), # noqa: E501
118+
'nature': (str,), # noqa: E501
120119
'parent_id': (int, none_type,), # noqa: E501
120+
'default_permission': (int,), # noqa: E501
121121
'children': ([WriteFolder], none_type,), # noqa: E501
122122
}
123123

@@ -127,48 +127,48 @@ def discriminator():
127127

128128

129129
attribute_map = {
130-
'nature': 'nature', # noqa: E501
131-
'groups_permissions': 'groups_permissions', # noqa: E501
132-
'created_by': 'created_by', # noqa: E501
133-
'type': 'type', # noqa: E501
134130
'user_permission': 'user_permission', # noqa: E501
135-
'updated_at': 'updated_at', # noqa: E501
136131
'id': 'id', # noqa: E501
137-
'name': 'name', # noqa: E501
132+
'updated_at': 'updated_at', # noqa: E501
138133
'created_at': 'created_at', # noqa: E501
139-
'default_permission': 'default_permission', # noqa: E501
134+
'created_by': 'created_by', # noqa: E501
135+
'groups_permissions': 'groups_permissions', # noqa: E501
136+
'name': 'name', # noqa: E501
137+
'type': 'type', # noqa: E501
138+
'nature': 'nature', # noqa: E501
140139
'parent_id': 'parent_id', # noqa: E501
140+
'default_permission': 'default_permission', # noqa: E501
141141
'children': 'children', # noqa: E501
142142
}
143143

144144
read_only_vars = {
145-
'nature', # noqa: E501
146-
'groups_permissions', # noqa: E501
147-
'created_by', # noqa: E501
148-
'type', # noqa: E501
149145
'user_permission', # noqa: E501
150-
'updated_at', # noqa: E501
151146
'id', # noqa: E501
147+
'updated_at', # noqa: E501
152148
'created_at', # noqa: E501
149+
'created_by', # noqa: E501
150+
'groups_permissions', # noqa: E501
151+
'type', # noqa: E501
152+
'nature', # noqa: E501
153153
}
154154

155155
_composed_schemas = {}
156156

157157
@classmethod
158158
@convert_js_args_to_python_args
159-
def _from_openapi_data(cls, nature, groups_permissions, created_by, type, user_permission, updated_at, id, name, created_at, *args, **kwargs): # noqa: E501
159+
def _from_openapi_data(cls, user_permission, id, updated_at, created_at, created_by, groups_permissions, name, type, nature, *args, **kwargs): # noqa: E501
160160
"""WriteFolder - a model defined in OpenAPI
161161
162162
Args:
163-
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
164-
groups_permissions ([GroupFolderRead]): List of group permissions
165-
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
166-
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
167163
user_permission (int): Aggregate of group user permissions and folder default permission
168-
updated_at (datetime): Date of the last update
169164
id (int):
170-
name (str): Name of the folder
165+
updated_at (datetime): Date of the last update
171166
created_at (datetime): Creation date
167+
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
168+
groups_permissions ([GroupFolderRead]): List of group permissions
169+
name (str): Name of the folder
170+
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
171+
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
172172
173173
Keyword Args:
174174
_check_type (bool): if True, values for parameters in openapi_types
@@ -201,8 +201,8 @@ def _from_openapi_data(cls, nature, groups_permissions, created_by, type, user_p
201201
Animal class but this time we won't travel
202202
through its discriminator because we passed in
203203
_visited_composed_classes = (Animal,)
204-
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
205204
parent_id (int, none_type): [optional] # noqa: E501
205+
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
206206
children ([WriteFolder], none_type): [optional] # noqa: E501
207207
"""
208208

@@ -231,15 +231,15 @@ def _from_openapi_data(cls, nature, groups_permissions, created_by, type, user_p
231231
self._configuration = _configuration
232232
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
233233

234-
self.nature = nature
235-
self.groups_permissions = groups_permissions
236-
self.created_by = created_by
237-
self.type = type
238234
self.user_permission = user_permission
239-
self.updated_at = updated_at
240235
self.id = id
241-
self.name = name
236+
self.updated_at = updated_at
242237
self.created_at = created_at
238+
self.created_by = created_by
239+
self.groups_permissions = groups_permissions
240+
self.name = name
241+
self.type = type
242+
self.nature = nature
243243
for var_name, var_value in kwargs.items():
244244
if var_name not in self.attribute_map and \
245245
self._configuration is not None and \
@@ -295,8 +295,8 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
295295
Animal class but this time we won't travel
296296
through its discriminator because we passed in
297297
_visited_composed_classes = (Animal,)
298-
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
299298
parent_id (int, none_type): [optional] # noqa: E501
299+
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
300300
children ([WriteFolder], none_type): [optional] # noqa: E501
301301
"""
302302

bimdata_api_client/model/write_folder_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def openapi_types():
102102
lazy_import()
103103
return {
104104
'name': (str,), # noqa: E501
105-
'default_permission': (int,), # noqa: E501
106105
'parent_id': (int, none_type,), # noqa: E501
106+
'default_permission': (int,), # noqa: E501
107107
'children': ([WriteFolder], none_type,), # noqa: E501
108108
}
109109

@@ -114,8 +114,8 @@ def discriminator():
114114

115115
attribute_map = {
116116
'name': 'name', # noqa: E501
117-
'default_permission': 'default_permission', # noqa: E501
118117
'parent_id': 'parent_id', # noqa: E501
118+
'default_permission': 'default_permission', # noqa: E501
119119
'children': 'children', # noqa: E501
120120
}
121121

@@ -163,8 +163,8 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501
163163
Animal class but this time we won't travel
164164
through its discriminator because we passed in
165165
_visited_composed_classes = (Animal,)
166-
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
167166
parent_id (int, none_type): [optional] # noqa: E501
167+
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
168168
children ([WriteFolder], none_type): [optional] # noqa: E501
169169
"""
170170

@@ -251,8 +251,8 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
251251
Animal class but this time we won't travel
252252
through its discriminator because we passed in
253253
_visited_composed_classes = (Animal,)
254-
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
255254
parent_id (int, none_type): [optional] # noqa: E501
255+
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
256256
children ([WriteFolder], none_type): [optional] # noqa: E501
257257
"""
258258

docs/CollaborationApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,14 +1481,14 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
14811481
id = 1 # int | A unique integer value identifying this project.
14821482
write_folder_request = [
14831483
WriteFolderRequest(
1484+
parent_id=1,
14841485
default_permission=1,
14851486
name="name_example",
1486-
parent_id=1,
14871487
children=[
14881488
WriteFolder(
1489+
parent_id=1,
14891490
default_permission=1,
14901491
name="name_example",
1491-
parent_id=1,
14921492
children=None,
14931493
),
14941494
],
@@ -1545,7 +1545,7 @@ Name | Type | Description | Notes
15451545
15461546
Create a document
15471547

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

15501550
### Example
15511551

docs/WriteFolder.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**nature** | **str** | Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
8-
**groups_permissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
9-
**created_by** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
10-
**type** | **str** | DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
117
**user_permission** | **int** | Aggregate of group user permissions and folder default permission | [readonly]
12-
**updated_at** | **datetime** | Date of the last update | [readonly]
138
**id** | **int** | | [readonly]
14-
**name** | **str** | Name of the folder |
9+
**updated_at** | **datetime** | Date of the last update | [readonly]
1510
**created_at** | **datetime** | Creation date | [readonly]
16-
**default_permission** | **int** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
11+
**created_by** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
12+
**groups_permissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
13+
**name** | **str** | Name of the folder |
14+
**type** | **str** | DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
15+
**nature** | **str** | Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
1716
**parent_id** | **int, none_type** | | [optional]
17+
**default_permission** | **int** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
1818
**children** | [**[WriteFolder], none_type**](WriteFolder.md) | | [optional]
1919
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
2020

docs/WriteFolderRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**name** | **str** | Name of the folder |
8-
**default_permission** | **int** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
98
**parent_id** | **int, none_type** | | [optional]
9+
**default_permission** | **int** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
1010
**children** | [**[WriteFolder], none_type**](WriteFolder.md) | | [optional]
1111
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1212

0 commit comments

Comments
 (0)