Skip to content

Commit

Permalink
PATCH: fix openAPI definition of getProjectFolderTree
Browse files Browse the repository at this point in the history
  • Loading branch information
Bimdata-io committed Dec 20, 2023
1 parent 4ba4d60 commit c88cf8e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 249 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ Class | Method | HTTP request | Description
*CollaborationApi* | [**get_project_creator_visas**](docs/CollaborationApi.md#get_project_creator_visas) | **GET** /cloud/{cloud_pk}/project/{project_pk}/me/visa/creator | List visas created by user
*CollaborationApi* | [**get_project_dms_tree**](docs/CollaborationApi.md#get_project_dms_tree) | **GET** /cloud/{cloud_pk}/project/{id}/dms-tree | Retrieve the complete DMS tree
*CollaborationApi* | [**get_project_folder_tree**](docs/CollaborationApi.md#get_project_folder_tree) | **GET** /cloud/{cloud_pk}/project/{id}/folder-tree | Retrieve folder tree of the project
*CollaborationApi* | [**get_project_folder_tree_serializers**](docs/CollaborationApi.md#get_project_folder_tree_serializers) | **GET** /cloud/{cloud_pk}/project/folder-trees | Retrieve folder tree for all projects
*CollaborationApi* | [**get_project_invitations**](docs/CollaborationApi.md#get_project_invitations) | **GET** /cloud/{cloud_pk}/project/{project_pk}/invitation | Retrieve all pending invitations in the project
*CollaborationApi* | [**get_project_size**](docs/CollaborationApi.md#get_project_size) | **GET** /cloud/{cloud_pk}/project/{id}/size | Get size of all model files in the project
*CollaborationApi* | [**get_project_sub_tree**](docs/CollaborationApi.md#get_project_sub_tree) | **GET** /cloud/{cloud_pk}/project/subtree | Retrieve the complete projects tree of the cloud
Expand Down
138 changes: 3 additions & 135 deletions bimdata_api_client/api/collaboration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4587,7 +4587,7 @@ def __init__(self, api_client=None):
)
self.get_project_folder_tree_endpoint = _Endpoint(
settings={
'response_type': (ProjectFolderTree,),
'response_type': ([ProjectFolderTree],),
'auth': [
'ApiKey',
'BIMData_Connect',
Expand Down Expand Up @@ -4645,60 +4645,6 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
self.get_project_folder_tree_serializers_endpoint = _Endpoint(
settings={
'response_type': ([ProjectFolderTree],),
'auth': [
'ApiKey',
'BIMData_Connect',
'BIMData_Connect',
'Bearer'
],
'endpoint_path': '/cloud/{cloud_pk}/project/folder-trees',
'operation_id': 'get_project_folder_tree_serializers',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'cloud_pk',
],
'required': [
'cloud_pk',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'cloud_pk':
(int,),
},
'attribute_map': {
'cloud_pk': 'cloud_pk',
},
'location_map': {
'cloud_pk': 'path',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.get_project_invitations_endpoint = _Endpoint(
settings={
'response_type': ([ProjectInvitation],),
Expand Down Expand Up @@ -8732,7 +8678,7 @@ def create_document(
):
"""Create a document # noqa: E501

Create a document. If the document is one of {'DWG', 'POINT_CLOUD', 'OBJ', 'GLTF', 'DXF', 'IFC'}, 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 {'OBJ', 'POINT_CLOUD', 'IFC', 'GLTF', 'DWG', 'DXF'}, 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 Expand Up @@ -13156,7 +13102,7 @@ def get_project_folder_tree(
async_req (bool): execute request asynchronously

Returns:
ProjectFolderTree
[ProjectFolderTree]
If the method is called asynchronously, returns the request
thread.
"""
Expand Down Expand Up @@ -13190,84 +13136,6 @@ def get_project_folder_tree(
id
return self.get_project_folder_tree_endpoint.call_with_http_info(**kwargs)

def get_project_folder_tree_serializers(
self,
cloud_pk,
**kwargs
):
"""Retrieve folder tree for all projects # noqa: E501

Retrieve folder tree for all projects # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_project_folder_tree_serializers(cloud_pk, async_req=True)
>>> result = thread.get()

Args:
cloud_pk (int):

Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously

Returns:
[ProjectFolderTree]
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['cloud_pk'] = \
cloud_pk
return self.get_project_folder_tree_serializers_endpoint.call_with_http_info(**kwargs)

def get_project_invitations(
self,
cloud_pk,
Expand Down
108 changes: 2 additions & 106 deletions docs/CollaborationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ Method | HTTP request | Description
[**get_project_creator_visas**](CollaborationApi.md#get_project_creator_visas) | **GET** /cloud/{cloud_pk}/project/{project_pk}/me/visa/creator | List visas created by user
[**get_project_dms_tree**](CollaborationApi.md#get_project_dms_tree) | **GET** /cloud/{cloud_pk}/project/{id}/dms-tree | Retrieve the complete DMS tree
[**get_project_folder_tree**](CollaborationApi.md#get_project_folder_tree) | **GET** /cloud/{cloud_pk}/project/{id}/folder-tree | Retrieve folder tree of the project
[**get_project_folder_tree_serializers**](CollaborationApi.md#get_project_folder_tree_serializers) | **GET** /cloud/{cloud_pk}/project/folder-trees | Retrieve folder tree for all projects
[**get_project_invitations**](CollaborationApi.md#get_project_invitations) | **GET** /cloud/{cloud_pk}/project/{project_pk}/invitation | Retrieve all pending invitations in the project
[**get_project_size**](CollaborationApi.md#get_project_size) | **GET** /cloud/{cloud_pk}/project/{id}/size | Get size of all model files in the project
[**get_project_sub_tree**](CollaborationApi.md#get_project_sub_tree) | **GET** /cloud/{cloud_pk}/project/subtree | Retrieve the complete projects tree of the cloud
Expand Down Expand Up @@ -1541,7 +1540,7 @@ Name | Type | Description | Notes

Create a document

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

### Example

Expand Down Expand Up @@ -7172,7 +7171,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_project_folder_tree**
> ProjectFolderTree get_project_folder_tree(cloud_pk, id)
> [ProjectFolderTree] get_project_folder_tree(cloud_pk, id)

Retrieve folder tree of the project

Expand Down Expand Up @@ -7252,109 +7251,6 @@ Name | Type | Description | Notes

### Return type

[**ProjectFolderTree**](ProjectFolderTree.md)

### Authorization

[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
**401** | The authentication failed. Your token may be expired, missing or malformed | - |
**403** | You don't have the authorization to access this resource. Check if the resource is exclusive to users or app (eg: /user is exclusive to users) or if your user has the right to access this resource. | - |
**404** | The resource does not exist or you don't have the right to see if the resource exists | - |
**500** | Something really bad happened. Check if your route is correct. By example: /cloud/[object Object]/project may raise a 500. An alert is automatically sent to us, we'll look at it shortly. | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_project_folder_tree_serializers**
> [ProjectFolderTree] get_project_folder_tree_serializers(cloud_pk)

Retrieve folder tree for all projects

Retrieve folder tree for all projects

### Example

* Api Key Authentication (ApiKey):
* OAuth Authentication (BIMData_Connect):
* OAuth Authentication (BIMData_Connect):
* Api Key Authentication (Bearer):

```python
import time
import bimdata_api_client
from bimdata_api_client.api import collaboration_api
from bimdata_api_client.model.project_folder_tree import ProjectFolderTree
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bimdata_api_client.Configuration(
host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with bimdata_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = collaboration_api.CollaborationApi(api_client)
cloud_pk = 1 # int |

# example passing only required values which don't have defaults set
try:
# Retrieve folder tree for all projects
api_response = api_instance.get_project_folder_tree_serializers(cloud_pk)
pprint(api_response)
except bimdata_api_client.ApiException as e:
print("Exception when calling CollaborationApi->get_project_folder_tree_serializers: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cloud_pk** | **int**| |

### Return type

[**[ProjectFolderTree]**](ProjectFolderTree.md)

### Authorization
Expand Down
7 changes: 0 additions & 7 deletions test/test_collaboration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,6 @@ def test_get_project_folder_tree(self):
"""
pass

def test_get_project_folder_tree_serializers(self):
"""Test case for get_project_folder_tree_serializers
Retrieve folder tree for all projects # noqa: E501
"""
pass

def test_get_project_invitations(self):
"""Test case for get_project_invitations
Expand Down

0 comments on commit c88cf8e

Please sign in to comment.