Skip to content

Commit

Permalink
MINOR: Feat/add link between zone and storey (#723)
Browse files Browse the repository at this point in the history
* Add a link between zone and storey.

* Zone-storey, use uuid instead of pk.

* Rename storey as storey_uuid in zone serializer.

* Split update/remove storey from zone test.
  • Loading branch information
Bimdata-io committed Feb 22, 2024
1 parent d68b901 commit abe503b
Show file tree
Hide file tree
Showing 20 changed files with 357 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ bimdata_api_client/model/viewpoint.py
bimdata_api_client/model/viewpoint_request.py
bimdata_api_client/model/visa.py
bimdata_api_client/model/visa_attachment.py
bimdata_api_client/model/visa_attachment_request.py
bimdata_api_client/model/visa_comment.py
bimdata_api_client/model/visa_comment_request.py
bimdata_api_client/model/visa_request.py
Expand Down Expand Up @@ -489,6 +490,7 @@ docs/Viewpoint.md
docs/ViewpointRequest.md
docs/Visa.md
docs/VisaAttachment.md
docs/VisaAttachmentRequest.md
docs/VisaComment.md
docs/VisaCommentRequest.md
docs/VisaRequest.md
Expand Down Expand Up @@ -740,6 +742,7 @@ test/test_viewpoint.py
test/test_viewpoint_request.py
test/test_visa.py
test/test_visa_attachment.py
test/test_visa_attachment_request.py
test/test_visa_comment.py
test/test_visa_comment_request.py
test/test_visa_request.py
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@ Class | Method | HTTP request | Description
- [ViewpointRequest](docs/ViewpointRequest.md)
- [Visa](docs/Visa.md)
- [VisaAttachment](docs/VisaAttachment.md)
- [VisaAttachmentRequest](docs/VisaAttachmentRequest.md)
- [VisaComment](docs/VisaComment.md)
- [VisaCommentRequest](docs/VisaCommentRequest.md)
- [VisaRequest](docs/VisaRequest.md)
Expand Down
8 changes: 5 additions & 3 deletions bimdata_api_client/api/collaboration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ def __init__(self, api_client=None):
],
'content_type': [
'multipart/form-data',
'application/x-www-form-urlencoded'
'application/x-www-form-urlencoded',
'application/json'
]
},
api_client=api_client
Expand Down Expand Up @@ -2820,7 +2821,8 @@ def __init__(self, api_client=None):
],
'content_type': [
'multipart/form-data',
'application/x-www-form-urlencoded'
'application/x-www-form-urlencoded',
'application/json'
]
},
api_client=api_client
Expand Down Expand Up @@ -8739,7 +8741,7 @@ def create_document(
):
"""Create a document # noqa: E501

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

Expand Down
4 changes: 4 additions & 0 deletions bimdata_api_client/model/folder_without_children_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def openapi_types():
'name': (str,), # noqa: E501
'parent_id': (int, none_type,), # noqa: E501
'default_permission': (int,), # noqa: E501
'propagate': (bool,), # noqa: E501
}

@cached_property
Expand All @@ -109,6 +110,7 @@ def discriminator():
'name': 'name', # noqa: E501
'parent_id': 'parent_id', # noqa: E501
'default_permission': 'default_permission', # noqa: E501
'propagate': 'propagate', # noqa: E501
}

read_only_vars = {
Expand Down Expand Up @@ -157,6 +159,7 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
parent_id (int, none_type): [optional] # noqa: E501
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
propagate (bool): [optional] if omitted the server will use the default value of False # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -244,6 +247,7 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
parent_id (int, none_type): [optional] # noqa: E501
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
propagate (bool): [optional] if omitted the server will use the default value of False # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def openapi_types():
'parent_id': (int, none_type,), # noqa: E501
'name': (str,), # noqa: E501
'default_permission': (int,), # noqa: E501
'propagate': (bool,), # noqa: E501
}

@cached_property
Expand All @@ -109,6 +110,7 @@ def discriminator():
'parent_id': 'parent_id', # noqa: E501
'name': 'name', # noqa: E501
'default_permission': 'default_permission', # noqa: E501
'propagate': 'propagate', # noqa: E501
}

read_only_vars = {
Expand Down Expand Up @@ -155,6 +157,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
parent_id (int, none_type): [optional] # noqa: E501
name (str): Name of the folder. [optional] # noqa: E501
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
propagate (bool): [optional] if omitted the server will use the default value of False # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -239,6 +242,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
parent_id (int, none_type): [optional] # noqa: E501
name (str): Name of the folder. [optional] # noqa: E501
default_permission (int): Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write. [optional] # noqa: E501
propagate (bool): [optional] if omitted the server will use the default value of False # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
7 changes: 7 additions & 0 deletions bimdata_api_client/model/patched_zone_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ class PatchedZoneRequest(ModelNormal):
('order',): {
'inclusive_minimum': 0,
},
('storey_uuid',): {
'min_length': 1,
},
}

@cached_property
Expand Down Expand Up @@ -110,6 +113,7 @@ def openapi_types():
'spaces': ([ZoneSpaceRequest],), # noqa: E501
'color': (str, none_type,), # noqa: E501
'order': (int,), # noqa: E501
'storey_uuid': (str, none_type,), # noqa: E501
}

@cached_property
Expand All @@ -125,6 +129,7 @@ def discriminator():
'spaces': 'spaces', # noqa: E501
'color': 'color', # noqa: E501
'order': 'order', # noqa: E501
'storey_uuid': 'storey_uuid', # noqa: E501
}

read_only_vars = {
Expand Down Expand Up @@ -175,6 +180,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
spaces ([ZoneSpaceRequest]): [optional] # noqa: E501
color (str, none_type): [optional] # noqa: E501
order (int): [optional] # noqa: E501
storey_uuid (str, none_type): IFC element or element type UUID. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -263,6 +269,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
spaces ([ZoneSpaceRequest]): [optional] # noqa: E501
color (str, none_type): [optional] # noqa: E501
order (int): [optional] # noqa: E501
storey_uuid (str, none_type): IFC element or element type UUID. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
Loading

0 comments on commit abe503b

Please sign in to comment.