Skip to content

Commit 0f78cf7

Browse files
committed
PATCH: fix(equipment): extend schema view for EquipmentDocumentViewSet (#1054)
1 parent 0d32969 commit 0f78cf7

24 files changed

Lines changed: 200 additions & 184 deletions

README.md

Lines changed: 3 additions & 3 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-
modified_author="modified_author_example",
148147
date=dateutil_parser('1970-01-01T00:00:00.00Z'),
149148
viewpoint_guid="viewpoint_guid_example",
150149
reply_to_comment_guid="reply_to_comment_guid_example",
151-
viewpoint_temp_id=1,
152-
author="author_example",
153150
comment="comment_example",
151+
author="author_example",
152+
modified_author="modified_author_example",
153+
viewpoint_temp_id=1,
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 {'OBJ', 'DWG', 'IFC', 'DXF', 'PHOTOSPHERE', 'POINT_CLOUD', 'GLTF'}, 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 {'DWG', 'POINT_CLOUD', 'IFC', 'PHOTOSPHERE', 'OBJ', 'GLTF', 'DXF'}, 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: 19 additions & 6 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': (LightDocument,),
10692+
'response_type': ([Document],),
1069310693
'auth': [
1069410694
'ApiKey',
1069510695
'BIMData_Connect',
@@ -10707,12 +10707,14 @@ def __init__(self, api_client=None):
1070710707
'equipment_pk',
1070810708
'model_pk',
1070910709
'project_pk',
10710+
'request_body',
1071010711
],
1071110712
'required': [
1071210713
'cloud_pk',
1071310714
'equipment_pk',
1071410715
'model_pk',
1071510716
'project_pk',
10717+
'request_body',
1071610718
],
1071710719
'nullable': [
1071810720
],
@@ -10735,6 +10737,8 @@ def __init__(self, api_client=None):
1073510737
(int,),
1073610738
'project_pk':
1073710739
(int,),
10740+
'request_body':
10741+
([int],),
1073810742
},
1073910743
'attribute_map': {
1074010744
'cloud_pk': 'cloud_pk',
@@ -10747,6 +10751,7 @@ def __init__(self, api_client=None):
1074710751
'equipment_pk': 'path',
1074810752
'model_pk': 'path',
1074910753
'project_pk': 'path',
10754+
'request_body': 'body',
1075010755
},
1075110756
'collection_format_map': {
1075210757
}
@@ -10755,7 +10760,11 @@ def __init__(self, api_client=None):
1075510760
'accept': [
1075610761
'application/json'
1075710762
],
10758-
'content_type': [],
10763+
'content_type': [
10764+
'application/json',
10765+
'application/x-www-form-urlencoded',
10766+
'multipart/form-data'
10767+
]
1075910768
},
1076010769
api_client=api_client
1076110770
)
@@ -26756,7 +26765,7 @@ def link_documents_of_element(
2675626765
):
2675726766
"""Link one or many documents to an element # noqa: E501
2675826767

26759-
Bulk relation create available. You can either post an id or a list of ids. Is you post a list, the response will be a list (in the same order) of created relation or of errors if any If at least one create succeeded, the status code will be 201. If every create failed, the status code we'll be 400 with the list of errors Required scopes: ifc:write, model:write # noqa: E501
26768+
Bulk relation create available. You can either post an id or a list of ids. If you post a list, the response will be a list of created relation (in the same order) or of errors if any. If at least one create succeed, the status code will be 201. If every create failed, the status code we'll be 400 with the list of errors. Required scopes: ifc:write, model:write # noqa: E501
2676026769
This method makes a synchronous HTTP request by default. To make an
2676126770
asynchronous HTTP request, please pass async_req=True
2676226771

@@ -26845,22 +26854,24 @@ def link_documents_to_equipment(
2684526854
equipment_pk,
2684626855
model_pk,
2684726856
project_pk,
26857+
request_body,
2684826858
**kwargs
2684926859
):
2685026860
"""Link one or many documents to an equipment # noqa: E501
2685126861

26852-
Bulk relation create available. You can either post an id or a list of ids. Is you post a list, the response will be a list (in the same order) of created relation or of errors if any If at least one create succeeded, the status code will be 201. If every create failed, the status code we'll be 400 with the list of errors Required scopes: ifc:write, model:write # noqa: E501
26862+
Bulk relation create available. You can either post an id or a list of ids. If you post a list, the response will be a list of created relation (in the same order) or of errors if any. If at least one create succeed, the status code will be 201. If every create failed, the status code we'll be 400 with the list of errors. Required scopes: ifc:write, model:write # noqa: E501
2685326863
This method makes a synchronous HTTP request by default. To make an
2685426864
asynchronous HTTP request, please pass async_req=True
2685526865

26856-
>>> thread = api.link_documents_to_equipment(cloud_pk, equipment_pk, model_pk, project_pk, async_req=True)
26866+
>>> thread = api.link_documents_to_equipment(cloud_pk, equipment_pk, model_pk, project_pk, request_body, async_req=True)
2685726867
>>> result = thread.get()
2685826868

2685926869
Args:
2686026870
cloud_pk (int): A unique integer value identifying this cloud.
2686126871
equipment_pk (int): A unique integer value identifying this equipment.
2686226872
model_pk (int): A unique integer value identifying this model.
2686326873
project_pk (int): A unique integer value identifying this project.
26874+
request_body ([int]):
2686426875

2686526876
Keyword Args:
2686626877
_return_http_data_only (bool): response data without head status
@@ -26891,7 +26902,7 @@ def link_documents_to_equipment(
2689126902
async_req (bool): execute request asynchronously
2689226903

2689326904
Returns:
26894-
LightDocument
26905+
[Document]
2689526906
If the method is called asynchronously, returns the request
2689626907
thread.
2689726908
"""
@@ -26927,6 +26938,8 @@ def link_documents_to_equipment(
2692726938
model_pk
2692826939
kwargs['project_pk'] = \
2692926940
project_pk
26941+
kwargs['request_body'] = \
26942+
request_body
2693026943
return self.link_documents_to_equipment_endpoint.call_with_http_info(**kwargs)
2693126944

2693226945
def list_classification_element_relations(

bimdata_api_client/model/comment.py

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

6161
validations = {
62-
('modified_author',): {
62+
('author',): {
6363
'max_length': 254,
6464
},
65-
('author',): {
65+
('modified_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-
'modified_author': (str, none_type,), # noqa: E501
9493
'date': (datetime,), # noqa: E501
9594
'viewpoint_guid': (str, none_type,), # noqa: E501
9695
'reply_to_comment_guid': (str, none_type,), # noqa: E501
97-
'author': (str, none_type,), # noqa: E501
9896
'comment': (str,), # noqa: E501
97+
'author': (str, none_type,), # noqa: E501
98+
'modified_author': (str, none_type,), # 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-
'modified_author': 'modified_author', # noqa: E501
111110
'date': 'date', # noqa: E501
112111
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
113112
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
114-
'author': 'author', # noqa: E501
115113
'comment': 'comment', # noqa: E501
114+
'author': 'author', # noqa: E501
115+
'modified_author': 'modified_author', # 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-
modified_author (str, none_type): [optional] # noqa: E501
167166
date (datetime): [optional] # noqa: E501
168167
viewpoint_guid (str, none_type): [optional] # noqa: E501
169168
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
170-
author (str, none_type): [optional] # noqa: E501
171169
comment (str): [optional] # noqa: E501
170+
author (str, none_type): [optional] # noqa: E501
171+
modified_author (str, none_type): [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-
modified_author (str, none_type): [optional] # noqa: E501
257256
date (datetime): [optional] # noqa: E501
258257
viewpoint_guid (str, none_type): [optional] # noqa: E501
259258
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
260-
author (str, none_type): [optional] # noqa: E501
261259
comment (str): [optional] # noqa: E501
260+
author (str, none_type): [optional] # noqa: E501
261+
modified_author (str, none_type): [optional] # noqa: E501
262262
guid (str): [optional] # noqa: E501
263263
"""
264264

bimdata_api_client/model/comment_request.py

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

6161
validations = {
62-
('modified_author',): {
62+
('author',): {
6363
'max_length': 254,
6464
},
65-
('author',): {
65+
('modified_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-
'modified_author': (str, none_type,), # noqa: E501
9291
'date': (datetime,), # noqa: E501
9392
'viewpoint_guid': (str, none_type,), # noqa: E501
9493
'reply_to_comment_guid': (str, none_type,), # noqa: E501
95-
'viewpoint_temp_id': (int,), # noqa: E501
96-
'author': (str, none_type,), # noqa: E501
9794
'comment': (str,), # noqa: E501
95+
'author': (str, none_type,), # noqa: E501
96+
'modified_author': (str, none_type,), # noqa: E501
97+
'viewpoint_temp_id': (int,), # noqa: E501
9898
'guid': (str,), # noqa: E501
9999
}
100100

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

105105

106106
attribute_map = {
107-
'modified_author': 'modified_author', # noqa: E501
108107
'date': 'date', # noqa: E501
109108
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
110109
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
111-
'viewpoint_temp_id': 'viewpoint_temp_id', # noqa: E501
112-
'author': 'author', # noqa: E501
113110
'comment': 'comment', # noqa: E501
111+
'author': 'author', # noqa: E501
112+
'modified_author': 'modified_author', # noqa: E501
113+
'viewpoint_temp_id': 'viewpoint_temp_id', # 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-
modified_author (str, none_type): [optional] # noqa: E501
159158
date (datetime): [optional] # noqa: E501
160159
viewpoint_guid (str, none_type): [optional] # noqa: E501
161160
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
162-
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [optional] # noqa: E501
163-
author (str, none_type): [optional] # noqa: E501
164161
comment (str): [optional] # noqa: E501
162+
author (str, none_type): [optional] # noqa: E501
163+
modified_author (str, none_type): [optional] # noqa: E501
164+
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [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-
modified_author (str, none_type): [optional] # noqa: E501
248247
date (datetime): [optional] # noqa: E501
249248
viewpoint_guid (str, none_type): [optional] # noqa: E501
250249
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
251-
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [optional] # noqa: E501
252-
author (str, none_type): [optional] # noqa: E501
253250
comment (str): [optional] # noqa: E501
251+
author (str, none_type): [optional] # noqa: E501
252+
modified_author (str, none_type): [optional] # noqa: E501
253+
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [optional] # noqa: E501
254254
guid (str): [optional] # noqa: E501
255255
"""
256256

bimdata_api_client/model/document_text.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class DocumentText(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'ITALIAN': "italian",
62-
'SPANISH': "spanish",
6361
'GERMAN': "german",
64-
'ENGLISH': "english",
62+
'SPANISH': "spanish",
6563
'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): * `italian` - italian * `spanish` - spanish * `german` - german * `english` - english * `french` - french. [optional] # noqa: E501
156+
language (str, none_type): * `german` - german * `spanish` - spanish * `french` - french * `italian` - italian * `english` - english. [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): * `italian` - italian * `spanish` - spanish * `german` - german * `english` - english * `french` - french. [optional] # noqa: E501
240+
language (str, none_type): * `german` - german * `spanish` - spanish * `french` - french * `italian` - italian * `english` - english. [optional] # noqa: E501
241241
"""
242242

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

0 commit comments

Comments
 (0)