Skip to content

Commit 12edad5

Browse files
committed
PATCH: fix(equipment): use LightDocumentSerializer in extend_Schema_view
1 parent 7d2a1f8 commit 12edad5

22 files changed

Lines changed: 174 additions & 173 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
144144
projects_pk = 1 # int | A unique integer value identifying this project.
145145
topics_guid = "topics_guid_example" # str |
146146
comment_request = CommentRequest(
147-
date=dateutil_parser('1970-01-01T00:00:00.00Z'),
148-
viewpoint_guid="viewpoint_guid_example",
149-
reply_to_comment_guid="reply_to_comment_guid_example",
150147
comment="comment_example",
151-
author="author_example",
152148
modified_author="modified_author_example",
153149
viewpoint_temp_id=1,
150+
author="author_example",
151+
reply_to_comment_guid="reply_to_comment_guid_example",
152+
viewpoint_guid="viewpoint_guid_example",
153+
date=dateutil_parser('1970-01-01T00:00:00.00Z'),
154154
guid="guid_example",
155155
) # CommentRequest | (optional)
156156

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10239,7 +10239,7 @@ def create_document(
1023910239
):
1024010240
"""Create a document # noqa: E501
1024110241

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

bimdata_api_client/api/model_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10689,7 +10689,7 @@ def __init__(self, api_client=None):
1068910689
)
1069010690
self.link_documents_to_equipment_endpoint = _Endpoint(
1069110691
settings={
10692-
'response_type': ([Document],),
10692+
'response_type': ([LightDocument],),
1069310693
'auth': [
1069410694
'ApiKey',
1069510695
'BIMData_Connect',
@@ -26902,7 +26902,7 @@ def link_documents_to_equipment(
2690226902
async_req (bool): execute request asynchronously
2690326903

2690426904
Returns:
26905-
[Document]
26905+
[LightDocument]
2690626906
If the method is called asynchronously, returns the request
2690726907
thread.
2690826908
"""

bimdata_api_client/model/comment.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ class Comment(ModelNormal):
5959
}
6060

6161
validations = {
62-
('author',): {
62+
('modified_author',): {
6363
'max_length': 254,
6464
},
65-
('modified_author',): {
65+
('author',): {
6666
'max_length': 254,
6767
},
6868
}
@@ -90,12 +90,12 @@ def openapi_types():
9090
return {
9191
'topic_guid': (str,), # noqa: E501
9292
'modified_date': (datetime,), # noqa: E501
93-
'date': (datetime,), # noqa: E501
94-
'viewpoint_guid': (str, none_type,), # noqa: E501
95-
'reply_to_comment_guid': (str, none_type,), # noqa: E501
9693
'comment': (str,), # noqa: E501
97-
'author': (str, none_type,), # noqa: E501
9894
'modified_author': (str, none_type,), # noqa: E501
95+
'author': (str, none_type,), # noqa: E501
96+
'reply_to_comment_guid': (str, none_type,), # noqa: E501
97+
'viewpoint_guid': (str, none_type,), # noqa: E501
98+
'date': (datetime,), # noqa: E501
9999
'guid': (str,), # noqa: E501
100100
}
101101

@@ -107,12 +107,12 @@ def discriminator():
107107
attribute_map = {
108108
'topic_guid': 'topic_guid', # noqa: E501
109109
'modified_date': 'modified_date', # noqa: E501
110-
'date': 'date', # noqa: E501
111-
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
112-
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
113110
'comment': 'comment', # noqa: E501
114-
'author': 'author', # noqa: E501
115111
'modified_author': 'modified_author', # noqa: E501
112+
'author': 'author', # noqa: E501
113+
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
114+
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
115+
'date': 'date', # noqa: E501
116116
'guid': 'guid', # noqa: E501
117117
}
118118

@@ -163,12 +163,12 @@ def _from_openapi_data(cls, topic_guid, modified_date, *args, **kwargs): # noqa
163163
Animal class but this time we won't travel
164164
through its discriminator because we passed in
165165
_visited_composed_classes = (Animal,)
166-
date (datetime): [optional] # noqa: E501
167-
viewpoint_guid (str, none_type): [optional] # noqa: E501
168-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
169166
comment (str): [optional] # noqa: E501
170-
author (str, none_type): [optional] # noqa: E501
171167
modified_author (str, none_type): [optional] # noqa: E501
168+
author (str, none_type): [optional] # noqa: E501
169+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
170+
viewpoint_guid (str, none_type): [optional] # noqa: E501
171+
date (datetime): [optional] # noqa: E501
172172
guid (str): [optional] # noqa: E501
173173
"""
174174

@@ -253,12 +253,12 @@ def __init__(self, *args, **kwargs): # noqa: E501
253253
Animal class but this time we won't travel
254254
through its discriminator because we passed in
255255
_visited_composed_classes = (Animal,)
256-
date (datetime): [optional] # noqa: E501
257-
viewpoint_guid (str, none_type): [optional] # noqa: E501
258-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
259256
comment (str): [optional] # noqa: E501
260-
author (str, none_type): [optional] # noqa: E501
261257
modified_author (str, none_type): [optional] # noqa: E501
258+
author (str, none_type): [optional] # noqa: E501
259+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
260+
viewpoint_guid (str, none_type): [optional] # noqa: E501
261+
date (datetime): [optional] # noqa: E501
262262
guid (str): [optional] # noqa: E501
263263
"""
264264

bimdata_api_client/model/comment_request.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ class CommentRequest(ModelNormal):
5959
}
6060

6161
validations = {
62-
('author',): {
62+
('modified_author',): {
6363
'max_length': 254,
6464
},
65-
('modified_author',): {
65+
('author',): {
6666
'max_length': 254,
6767
},
6868
}
@@ -88,13 +88,13 @@ def openapi_types():
8888
and the value is attribute type.
8989
"""
9090
return {
91-
'date': (datetime,), # noqa: E501
92-
'viewpoint_guid': (str, none_type,), # noqa: E501
93-
'reply_to_comment_guid': (str, none_type,), # noqa: E501
9491
'comment': (str,), # noqa: E501
95-
'author': (str, none_type,), # noqa: E501
9692
'modified_author': (str, none_type,), # noqa: E501
9793
'viewpoint_temp_id': (int,), # noqa: E501
94+
'author': (str, none_type,), # noqa: E501
95+
'reply_to_comment_guid': (str, none_type,), # noqa: E501
96+
'viewpoint_guid': (str, none_type,), # noqa: E501
97+
'date': (datetime,), # noqa: E501
9898
'guid': (str,), # noqa: E501
9999
}
100100

@@ -104,13 +104,13 @@ def discriminator():
104104

105105

106106
attribute_map = {
107-
'date': 'date', # noqa: E501
108-
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
109-
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
110107
'comment': 'comment', # noqa: E501
111-
'author': 'author', # noqa: E501
112108
'modified_author': 'modified_author', # noqa: E501
113109
'viewpoint_temp_id': 'viewpoint_temp_id', # noqa: E501
110+
'author': 'author', # noqa: E501
111+
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
112+
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
113+
'date': 'date', # noqa: E501
114114
'guid': 'guid', # noqa: E501
115115
}
116116

@@ -155,13 +155,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
155155
Animal class but this time we won't travel
156156
through its discriminator because we passed in
157157
_visited_composed_classes = (Animal,)
158-
date (datetime): [optional] # noqa: E501
159-
viewpoint_guid (str, none_type): [optional] # noqa: E501
160-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
161158
comment (str): [optional] # noqa: E501
162-
author (str, none_type): [optional] # noqa: E501
163159
modified_author (str, none_type): [optional] # noqa: E501
164160
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [optional] # noqa: E501
161+
author (str, none_type): [optional] # noqa: E501
162+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
163+
viewpoint_guid (str, none_type): [optional] # noqa: E501
164+
date (datetime): [optional] # noqa: E501
165165
guid (str): [optional] # noqa: E501
166166
"""
167167

@@ -244,13 +244,13 @@ def __init__(self, *args, **kwargs): # noqa: E501
244244
Animal class but this time we won't travel
245245
through its discriminator because we passed in
246246
_visited_composed_classes = (Animal,)
247-
date (datetime): [optional] # noqa: E501
248-
viewpoint_guid (str, none_type): [optional] # noqa: E501
249-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
250247
comment (str): [optional] # noqa: E501
251-
author (str, none_type): [optional] # noqa: E501
252248
modified_author (str, none_type): [optional] # noqa: E501
253249
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [optional] # noqa: E501
250+
author (str, none_type): [optional] # noqa: E501
251+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
252+
viewpoint_guid (str, none_type): [optional] # noqa: E501
253+
date (datetime): [optional] # noqa: E501
254254
guid (str): [optional] # noqa: E501
255255
"""
256256

bimdata_api_client/model/document_text.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ class DocumentText(ModelNormal):
5959
('language',): {
6060
'None': None,
6161
'GERMAN': "german",
62+
'ENGLISH': "english",
63+
'ITALIAN': "italian",
6264
'SPANISH': "spanish",
6365
'FRENCH': "french",
64-
'ITALIAN': "italian",
65-
'ENGLISH': "english",
6666
'NULL': "null",
6767
},
6868
}
@@ -153,7 +153,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
153153
through its discriminator because we passed in
154154
_visited_composed_classes = (Animal,)
155155
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
156-
language (str, none_type): * `german` - german * `spanish` - spanish * `french` - french * `italian` - italian * `english` - english. [optional] # noqa: E501
156+
language (str, none_type): * `german` - german * `english` - english * `italian` - italian * `spanish` - spanish * `french` - french. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
@@ -237,7 +237,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
237237
through its discriminator because we passed in
238238
_visited_composed_classes = (Animal,)
239239
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
240-
language (str, none_type): * `german` - german * `spanish` - spanish * `french` - french * `italian` - italian * `english` - english. [optional] # noqa: E501
240+
language (str, none_type): * `german` - german * `english` - english * `italian` - italian * `spanish` - spanish * `french` - french. [optional] # noqa: E501
241241
"""
242242

243243
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/edit_folder.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ def openapi_types():
109109
"""
110110
lazy_import()
111111
return {
112-
'created_at': (datetime,), # noqa: E501
113-
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
114112
'nature': (str,), # noqa: E501
115-
'type': (str,), # noqa: E501
116-
'name': (str,), # noqa: E501
117113
'user_permission': (int,), # noqa: E501
114+
'type': (str,), # noqa: E501
118115
'id': (int,), # noqa: E501
119-
'updated_at': (datetime,), # noqa: E501
116+
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
120117
'groups_permissions': ([GroupFolderRead],), # noqa: E501
118+
'updated_at': (datetime,), # noqa: E501
119+
'created_at': (datetime,), # noqa: E501
120+
'name': (str,), # noqa: E501
121121
'conflicting_documents': ([LightDocument],), # noqa: E501
122122
'parent_id': (int, none_type,), # noqa: E501
123123
'default_permission': (int,), # noqa: E501
@@ -129,49 +129,49 @@ def discriminator():
129129

130130

131131
attribute_map = {
132-
'created_at': 'created_at', # noqa: E501
133-
'created_by': 'created_by', # noqa: E501
134132
'nature': 'nature', # noqa: E501
135-
'type': 'type', # noqa: E501
136-
'name': 'name', # noqa: E501
137133
'user_permission': 'user_permission', # noqa: E501
134+
'type': 'type', # noqa: E501
138135
'id': 'id', # noqa: E501
139-
'updated_at': 'updated_at', # noqa: E501
136+
'created_by': 'created_by', # noqa: E501
140137
'groups_permissions': 'groups_permissions', # noqa: E501
138+
'updated_at': 'updated_at', # noqa: E501
139+
'created_at': 'created_at', # noqa: E501
140+
'name': 'name', # noqa: E501
141141
'conflicting_documents': 'conflicting_documents', # noqa: E501
142142
'parent_id': 'parent_id', # noqa: E501
143143
'default_permission': 'default_permission', # noqa: E501
144144
}
145145

146146
read_only_vars = {
147-
'created_at', # noqa: E501
148-
'created_by', # noqa: E501
149147
'nature', # noqa: E501
150-
'type', # noqa: E501
151148
'user_permission', # noqa: E501
149+
'type', # noqa: E501
152150
'id', # noqa: E501
153-
'updated_at', # noqa: E501
151+
'created_by', # noqa: E501
154152
'groups_permissions', # noqa: E501
153+
'updated_at', # noqa: E501
154+
'created_at', # noqa: E501
155155
'conflicting_documents', # noqa: E501
156156
}
157157

158158
_composed_schemas = {}
159159

160160
@classmethod
161161
@convert_js_args_to_python_args
162-
def _from_openapi_data(cls, created_at, created_by, nature, type, name, user_permission, id, updated_at, groups_permissions, conflicting_documents, *args, **kwargs): # noqa: E501
162+
def _from_openapi_data(cls, nature, user_permission, type, id, created_by, groups_permissions, updated_at, created_at, name, conflicting_documents, *args, **kwargs): # noqa: E501
163163
"""EditFolder - a model defined in OpenAPI
164164
165165
Args:
166-
created_at (datetime): Creation date
167-
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
168166
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
169-
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
170-
name (str): Name of the folder
171167
user_permission (int): Aggregate of group user permissions and folder default permission
168+
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
172169
id (int):
173-
updated_at (datetime): Date of the last update
170+
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
174171
groups_permissions ([GroupFolderRead]): List of group permissions
172+
updated_at (datetime): Date of the last update
173+
created_at (datetime): Creation date
174+
name (str): Name of the folder
175175
conflicting_documents ([LightDocument]): Return document with naming conflict. This is only set when you move a folder
176176
177177
Keyword Args:
@@ -234,15 +234,15 @@ def _from_openapi_data(cls, created_at, created_by, nature, type, name, user_per
234234
self._configuration = _configuration
235235
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
236236

237-
self.created_at = created_at
238-
self.created_by = created_by
239237
self.nature = nature
240-
self.type = type
241-
self.name = name
242238
self.user_permission = user_permission
239+
self.type = type
243240
self.id = id
244-
self.updated_at = updated_at
241+
self.created_by = created_by
245242
self.groups_permissions = groups_permissions
243+
self.updated_at = updated_at
244+
self.created_at = created_at
245+
self.name = name
246246
self.conflicting_documents = conflicting_documents
247247
for var_name, var_value in kwargs.items():
248248
if var_name not in self.attribute_map and \

0 commit comments

Comments
 (0)