fix key query params

This commit is contained in:
Quentin 2023-11-23 08:53:53 +01:00
parent e02326f5db
commit 8fa1cac54f
Signed by: quentin
GPG key ID: E9602264D639FF68
2 changed files with 28 additions and 28 deletions

View file

@ -95,7 +95,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) [[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)
# **delete_key** # **delete_key**
> delete_key(access_key) > delete_key(id)
Delete a key Delete a key
@ -130,12 +130,12 @@ configuration = garage_admin_sdk.Configuration(
with garage_admin_sdk.ApiClient(configuration) as api_client: with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class # Create an instance of the API class
api_instance = key_api.KeyApi(api_client) api_instance = key_api.KeyApi(api_client)
access_key = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage id = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage
# example passing only required values which don't have defaults set # example passing only required values which don't have defaults set
try: try:
# Delete a key # Delete a key
api_instance.delete_key(access_key) api_instance.delete_key(id)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->delete_key: %s\n" % e) print("Exception when calling KeyApi->delete_key: %s\n" % e)
``` ```
@ -145,7 +145,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**access_key** | **str**| The exact API access key generated by Garage | **id** | **str**| The exact API access key generated by Garage |
### Return type ### Return type
@ -412,7 +412,7 @@ This endpoint does not need any parameter.
[[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) [[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)
# **update_key** # **update_key**
> KeyInfo update_key(access_key, update_key_request) > KeyInfo update_key(id, update_key_request)
Update a key Update a key
@ -449,7 +449,7 @@ configuration = garage_admin_sdk.Configuration(
with garage_admin_sdk.ApiClient(configuration) as api_client: with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class # Create an instance of the API class
api_instance = key_api.KeyApi(api_client) api_instance = key_api.KeyApi(api_client)
access_key = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage id = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage
update_key_request = UpdateKeyRequest( update_key_request = UpdateKeyRequest(
name="test-key", name="test-key",
allow=UpdateKeyRequestAllow( allow=UpdateKeyRequestAllow(
@ -463,7 +463,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
# example passing only required values which don't have defaults set # example passing only required values which don't have defaults set
try: try:
# Update a key # Update a key
api_response = api_instance.update_key(access_key, update_key_request) api_response = api_instance.update_key(id, update_key_request)
pprint(api_response) pprint(api_response)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->update_key: %s\n" % e) print("Exception when calling KeyApi->update_key: %s\n" % e)
@ -474,7 +474,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**access_key** | **str**| The exact API access key generated by Garage | **id** | **str**| The exact API access key generated by Garage |
**update_key_request** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | **update_key_request** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove |
### Return type ### Return type

View file

@ -104,10 +104,10 @@ class KeyApi(object):
}, },
params_map={ params_map={
'all': [ 'all': [
'access_key', 'id',
], ],
'required': [ 'required': [
'access_key', 'id',
], ],
'nullable': [ 'nullable': [
], ],
@ -122,14 +122,14 @@ class KeyApi(object):
'allowed_values': { 'allowed_values': {
}, },
'openapi_types': { 'openapi_types': {
'access_key': 'id':
(str,), (str,),
}, },
'attribute_map': { 'attribute_map': {
'access_key': 'access_key', 'id': 'id',
}, },
'location_map': { 'location_map': {
'access_key': 'path', 'id': 'query',
}, },
'collection_format_map': { 'collection_format_map': {
} }
@ -314,11 +314,11 @@ class KeyApi(object):
}, },
params_map={ params_map={
'all': [ 'all': [
'access_key', 'id',
'update_key_request', 'update_key_request',
], ],
'required': [ 'required': [
'access_key', 'id',
'update_key_request', 'update_key_request',
], ],
'nullable': [ 'nullable': [
@ -334,16 +334,16 @@ class KeyApi(object):
'allowed_values': { 'allowed_values': {
}, },
'openapi_types': { 'openapi_types': {
'access_key': 'id':
(str,), (str,),
'update_key_request': 'update_key_request':
(UpdateKeyRequest,), (UpdateKeyRequest,),
}, },
'attribute_map': { 'attribute_map': {
'access_key': 'access_key', 'id': 'id',
}, },
'location_map': { 'location_map': {
'access_key': 'path', 'id': 'query',
'update_key_request': 'body', 'update_key_request': 'body',
}, },
'collection_format_map': { 'collection_format_map': {
@ -445,7 +445,7 @@ class KeyApi(object):
def delete_key( def delete_key(
self, self,
access_key, id,
**kwargs **kwargs
): ):
"""Delete a key # noqa: E501 """Delete a key # noqa: E501
@ -454,11 +454,11 @@ class KeyApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_key(access_key, async_req=True) >>> thread = api.delete_key(id, async_req=True)
>>> result = thread.get() >>> result = thread.get()
Args: Args:
access_key (str): The exact API access key generated by Garage id (str): The exact API access key generated by Garage
Keyword Args: Keyword Args:
_return_http_data_only (bool): response data without head status _return_http_data_only (bool): response data without head status
@ -522,8 +522,8 @@ class KeyApi(object):
'_content_type') '_content_type')
kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['access_key'] = \ kwargs['id'] = \
access_key id
return self.delete_key_endpoint.call_with_http_info(**kwargs) return self.delete_key_endpoint.call_with_http_info(**kwargs)
def get_key( def get_key(
@ -770,7 +770,7 @@ class KeyApi(object):
def update_key( def update_key(
self, self,
access_key, id,
update_key_request, update_key_request,
**kwargs **kwargs
): ):
@ -780,11 +780,11 @@ class KeyApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_key(access_key, update_key_request, async_req=True) >>> thread = api.update_key(id, update_key_request, async_req=True)
>>> result = thread.get() >>> result = thread.get()
Args: Args:
access_key (str): The exact API access key generated by Garage id (str): The exact API access key generated by Garage
update_key_request (UpdateKeyRequest): For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove update_key_request (UpdateKeyRequest): For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
Keyword Args: Keyword Args:
@ -849,8 +849,8 @@ class KeyApi(object):
'_content_type') '_content_type')
kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['access_key'] = \ kwargs['id'] = \
access_key id
kwargs['update_key_request'] = \ kwargs['update_key_request'] = \
update_key_request update_key_request
return self.update_key_endpoint.call_with_http_info(**kwargs) return self.update_key_endpoint.call_with_http_info(**kwargs)