fix query param

This commit is contained in:
Quentin 2023-11-23 08:54:27 +01:00
parent 4e3e8ea998
commit 94a2301408
Signed by: quentin
GPG key ID: E9602264D639FF68
2 changed files with 26 additions and 26 deletions

View file

@ -63,7 +63,7 @@ Name | Type | Description | Notes
## deleteKey ## deleteKey
> deleteKey(accessKey) > deleteKey(id)
Delete a key Delete a key
@ -79,8 +79,8 @@ let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi(); let apiInstance = new garage.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage let id = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
apiInstance.deleteKey(accessKey).then(() => { apiInstance.deleteKey(id).then(() => {
console.log('API called successfully.'); console.log('API called successfully.');
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -93,7 +93,7 @@ apiInstance.deleteKey(accessKey).then(() => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage | **id** | **String**| The exact API access key generated by Garage |
### Return type ### Return type
@ -257,7 +257,7 @@ This endpoint does not need any parameter.
## updateKey ## updateKey
> KeyInfo updateKey(accessKey, updateKeyRequest) > KeyInfo updateKey(id, updateKeyRequest)
Update a key Update a key
@ -273,9 +273,9 @@ let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN" bearerAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new garage.KeyApi(); let apiInstance = new garage.KeyApi();
let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage let id = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage
let updateKeyRequest = new garage.UpdateKeyRequest(); // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove let updateKeyRequest = new garage.UpdateKeyRequest(); // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
apiInstance.updateKey(accessKey, updateKeyRequest).then((data) => { apiInstance.updateKey(id, updateKeyRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data); console.log('API called successfully. Returned data: ' + data);
}, (error) => { }, (error) => {
console.error(error); console.error(error);
@ -288,7 +288,7 @@ apiInstance.updateKey(accessKey, updateKeyRequest).then((data) => {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**accessKey** | **String**| The exact API access key generated by Garage | **id** | **String**| The exact API access key generated by Garage |
**updateKeyRequest** | [**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 | **updateKeyRequest** | [**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

@ -89,20 +89,20 @@ export default class KeyApi {
/** /**
* Delete a key * Delete a key
* Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. * Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/ */
deleteKeyWithHttpInfo(accessKey) { deleteKeyWithHttpInfo(id) {
let postBody = null; let postBody = null;
// verify the required parameter 'accessKey' is set // verify the required parameter 'id' is set
if (accessKey === undefined || accessKey === null) { if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'accessKey' when calling deleteKey"); throw new Error("Missing the required parameter 'id' when calling deleteKey");
} }
let pathParams = { let pathParams = {
'access_key': accessKey
}; };
let queryParams = { let queryParams = {
'id': id
}; };
let headerParams = { let headerParams = {
}; };
@ -123,11 +123,11 @@ export default class KeyApi {
/** /**
* Delete a key * Delete a key
* Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. * Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @return {Promise} a {@link https://www.promisejs.org/|Promise} * @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/ */
deleteKey(accessKey) { deleteKey(id) {
return this.deleteKeyWithHttpInfo(accessKey) return this.deleteKeyWithHttpInfo(id)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });
@ -278,15 +278,15 @@ export default class KeyApi {
/** /**
* Update a key * Update a key
* Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.* * Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.*
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove * @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response
*/ */
updateKeyWithHttpInfo(accessKey, updateKeyRequest) { updateKeyWithHttpInfo(id, updateKeyRequest) {
let postBody = updateKeyRequest; let postBody = updateKeyRequest;
// verify the required parameter 'accessKey' is set // verify the required parameter 'id' is set
if (accessKey === undefined || accessKey === null) { if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'accessKey' when calling updateKey"); throw new Error("Missing the required parameter 'id' when calling updateKey");
} }
// verify the required parameter 'updateKeyRequest' is set // verify the required parameter 'updateKeyRequest' is set
if (updateKeyRequest === undefined || updateKeyRequest === null) { if (updateKeyRequest === undefined || updateKeyRequest === null) {
@ -294,9 +294,9 @@ export default class KeyApi {
} }
let pathParams = { let pathParams = {
'access_key': accessKey
}; };
let queryParams = { let queryParams = {
'id': id
}; };
let headerParams = { let headerParams = {
}; };
@ -317,12 +317,12 @@ export default class KeyApi {
/** /**
* Update a key * Update a key
* Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.* * Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.*
* @param {String} accessKey The exact API access key generated by Garage * @param {String} id The exact API access key generated by Garage
* @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove * @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo} * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo}
*/ */
updateKey(accessKey, updateKeyRequest) { updateKey(id, updateKeyRequest) {
return this.updateKeyWithHttpInfo(accessKey, updateKeyRequest) return this.updateKeyWithHttpInfo(id, updateKeyRequest)
.then(function(response_and_data) { .then(function(response_and_data) {
return response_and_data.data; return response_and_data.data;
}); });