Skip to content

Commit 4132fa9

Browse files
authored
Merge pull request #61 from hotdata-dev/openapi-update-25703523775
chore: regenerate client from updated OpenAPI spec
2 parents 5b3db35 + b330276 commit 4132fa9

5 files changed

Lines changed: 375 additions & 25 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ target/
6464

6565
# Ipython Notebook
6666
.ipynb_checkpoints
67+
68+
.DS_Store

.openapi-generator-templates/configuration.mustache

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class Configuration:
175175
:param password: Password for HTTP basic authentication.
176176
{{#hasHttpSignatureMethods}}
177177
:param signing_info: Configuration parameters for the HTTP signature security scheme.
178-
Must be an instance of {{{packageName}}}.signing.HttpSigningConfiguration
178+
Must be an instance of {{packageName}}.signing.HttpSigningConfiguration
179179
{{/hasHttpSignatureMethods}}
180180
:param server_index: Index to servers configuration.
181181
:param server_variables: Mapping with string values to replace variables in
@@ -206,7 +206,7 @@ class Configuration:
206206

207207
Workspace / sandbox scoping example:
208208

209-
conf = {{{packageName}}}.Configuration(
209+
conf = {{packageName}}.Configuration(
210210
api_key='sk_live_...',
211211
workspace_id='ws_abc',
212212
session_id='sb_xyz',
@@ -224,7 +224,7 @@ conf = {{{packageName}}}.Configuration(
224224

225225
Configure API client with HTTP basic authentication:
226226

227-
conf = {{{packageName}}}.Configuration(
227+
conf = {{packageName}}.Configuration(
228228
username='the-user',
229229
password='the-password',
230230
)
@@ -243,7 +243,7 @@ conf = {{{packageName}}}.Configuration(
243243
Configure API client with HTTP signature authentication. Use the 'hs2019' signature scheme,
244244
sign the HTTP requests with the RSA-SSA-PSS signature algorithm, and set the expiration time
245245
of the signature to 5 minutes after the signature has been created.
246-
Note you can use the constants defined in the {{{packageName}}}.signing module, and you can
246+
Note you can use the constants defined in the {{packageName}}.signing module, and you can
247247
also specify arbitrary HTTP headers to be included in the HTTP signature, except for the
248248
'Authorization' header, which is used to carry the signature.
249249

@@ -252,18 +252,18 @@ conf = {{{packageName}}}.Configuration(
252252
load balancers may add/modify/remove headers. Include the HTTP headers that you know
253253
are not going to be modified in transit.
254254

255-
conf = {{{packageName}}}.Configuration(
256-
signing_info = {{{packageName}}}.signing.HttpSigningConfiguration(
255+
conf = {{packageName}}.Configuration(
256+
signing_info = {{packageName}}.signing.HttpSigningConfiguration(
257257
key_id = 'my-key-id',
258258
private_key_path = 'rsa.pem',
259-
signing_scheme = {{{packageName}}}.signing.SCHEME_HS2019,
260-
signing_algorithm = {{{packageName}}}.signing.ALGORITHM_RSASSA_PSS,
261-
signed_headers = [{{{packageName}}}.signing.HEADER_REQUEST_TARGET,
262-
{{{packageName}}}.signing.HEADER_CREATED,
263-
{{{packageName}}}.signing.HEADER_EXPIRES,
264-
{{{packageName}}}.signing.HEADER_HOST,
265-
{{{packageName}}}.signing.HEADER_DATE,
266-
{{{packageName}}}.signing.HEADER_DIGEST,
259+
signing_scheme = {{packageName}}.signing.SCHEME_HS2019,
260+
signing_algorithm = {{packageName}}.signing.ALGORITHM_RSASSA_PSS,
261+
signed_headers = [{{packageName}}.signing.HEADER_REQUEST_TARGET,
262+
{{packageName}}.signing.HEADER_CREATED,
263+
{{packageName}}.signing.HEADER_EXPIRES,
264+
{{packageName}}.signing.HEADER_HOST,
265+
{{packageName}}.signing.HEADER_DATE,
266+
{{packageName}}.signing.HEADER_DIGEST,
267267
'Content-Type',
268268
'User-Agent'
269269
],
@@ -304,7 +304,7 @@ conf = {{{packageName}}}.Configuration(
304304
) -> None:
305305
"""Constructor
306306
"""
307-
self._base_path = "{{{basePath}}}" if host is None else host
307+
self._base_path = "{{basePath}}" if host is None else host
308308
"""Default Base url
309309
"""
310310
self.server_index = 0 if server_index is None and host is None else server_index
@@ -438,11 +438,11 @@ conf = {{{packageName}}}.Configuration(
438438
"""Options to pass down to the underlying urllib3 socket
439439
"""
440440

441-
self.datetime_format = "{{{datetimeFormat}}}"
441+
self.datetime_format = "{{datetimeFormat}}"
442442
"""datetime format
443443
"""
444444

445-
self.date_format = "{{{dateFormat}}}"
445+
self.date_format = "{{dateFormat}}"
446446
"""date format
447447
"""
448448

@@ -694,7 +694,7 @@ conf = {{{packageName}}}.Configuration(
694694
'type': 'bearer',
695695
'in': 'header',
696696
{{#bearerFormat}}
697-
'format': '{{{.}}}',
697+
'format': '{{.}}',
698698
{{/bearerFormat}}
699699
'key': 'Authorization',
700700
'value': 'Bearer ' + self.api_key
@@ -746,20 +746,20 @@ conf = {{{packageName}}}.Configuration(
746746
return [
747747
{{#servers}}
748748
{
749-
'url': "{{{url}}}",
750-
'description': "{{{description}}}{{^description}}No description provided{{/description}}",
749+
'url': "{{url}}",
750+
'description': "{{description}}{{^description}}No description provided{{/description}}",
751751
{{#variables}}
752752
{{#-first}}
753753
'variables': {
754754
{{/-first}}
755-
'{{{name}}}': {
756-
'description': "{{{description}}}{{^description}}No description provided{{/description}}",
757-
'default_value': "{{{defaultValue}}}",
755+
'{{name}}': {
756+
'description': "{{description}}{{^description}}No description provided{{/description}}",
757+
'default_value': "{{defaultValue}}",
758758
{{#enumValues}}
759759
{{#-first}}
760760
'enum_values': [
761761
{{/-first}}
762-
"{{{.}}}"{{^-last}},{{/-last}}
762+
"{{.}}"{{^-last}},{{/-last}}
763763
{{#-last}}
764764
]
765765
{{/-last}}

.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,5 +289,4 @@ requirements.txt
289289
setup.cfg
290290
test-requirements.txt
291291
test/__init__.py
292-
test/test_results_format_query.py
293292
tox.ini

docs/WorkspacesApi.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.hotdata.dev*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**create_workspace**](WorkspacesApi.md#create_workspace) | **POST** /v1/workspaces | Create a workspace
8+
[**delete_workspace**](WorkspacesApi.md#delete_workspace) | **DELETE** /v1/workspaces/{public_id} | Delete a workspace
89
[**list_workspaces**](WorkspacesApi.md#list_workspaces) | **GET** /v1/workspaces | List workspaces
910

1011

@@ -92,6 +93,84 @@ Name | Type | Description | Notes
9293

9394
[[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)
9495

96+
# **delete_workspace**
97+
> delete_workspace(public_id)
98+
99+
Delete a workspace
100+
101+
Hard-deletes the workspace. Namespace, storage, and catalog deprovisioning runs asynchronously after the row is removed.
102+
103+
### Example
104+
105+
* Bearer Authentication (BearerAuth):
106+
107+
```python
108+
import hotdata
109+
from hotdata.rest import ApiException
110+
from pprint import pprint
111+
112+
# Defining the host is optional and defaults to https://api.hotdata.dev
113+
# See configuration.py for a list of all supported configuration parameters.
114+
configuration = hotdata.Configuration(
115+
host = "https://api.hotdata.dev"
116+
)
117+
118+
# The client must configure the authentication and authorization parameters
119+
# in accordance with the API server security policy.
120+
# Examples for each auth method are provided below, use the example that
121+
# satisfies your auth use case.
122+
123+
# Configure Bearer authorization: BearerAuth
124+
configuration = hotdata.Configuration(
125+
access_token = os.environ["BEARER_TOKEN"]
126+
)
127+
128+
# Enter a context with an instance of the API client
129+
with hotdata.ApiClient(configuration) as api_client:
130+
# Create an instance of the API class
131+
api_instance = hotdata.WorkspacesApi(api_client)
132+
public_id = 'public_id_example' # str | Public id of the workspace.
133+
134+
try:
135+
# Delete a workspace
136+
api_instance.delete_workspace(public_id)
137+
except Exception as e:
138+
print("Exception when calling WorkspacesApi->delete_workspace: %s\n" % e)
139+
```
140+
141+
142+
143+
### Parameters
144+
145+
146+
Name | Type | Description | Notes
147+
------------- | ------------- | ------------- | -------------
148+
**public_id** | **str**| Public id of the workspace. |
149+
150+
### Return type
151+
152+
void (empty response body)
153+
154+
### Authorization
155+
156+
[BearerAuth](../README.md#BearerAuth)
157+
158+
### HTTP request headers
159+
160+
- **Content-Type**: Not defined
161+
- **Accept**: application/json
162+
163+
### HTTP response details
164+
165+
| Status code | Description | Response headers |
166+
|-------------|-------------|------------------|
167+
**204** | Workspace deleted | - |
168+
**401** | Missing or invalid authorization | - |
169+
**403** | Workspace-scoped tokens are not allowed | - |
170+
**404** | Workspace not found, or caller is not a member of its organization | - |
171+
172+
[[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)
173+
95174
# **list_workspaces**
96175
> ListWorkspacesResponse list_workspaces(organization_public_id=organization_public_id)
97176

0 commit comments

Comments
 (0)