Skip to content

Commit a53e084

Browse files
elenaizaguirrebrioux
authored andcommitted
fix: openapi validation test for keychain-vault plugin
Includes tests for endpoints setKeychainEntryV1, getKeychainEntryV1, deleteKeychainEntryV1 and hasKeychainEntryV1, each of them, when appropiate, with test cases: - Right request - Request including an invalid parameter - Request without a required parameter Closes hyperledger-cacti#1329 Relationed with hyperledger-cacti#847 Signed-off-by: Elena Izaguirre <[email protected]>
1 parent e83ddc8 commit a53e084

File tree

3 files changed

+329
-19
lines changed

3 files changed

+329
-19
lines changed

packages/cactus-plugin-keychain-vault/src/main/json/openapi.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,23 @@
9494
"summary": "Retrieves the contents of a keychain entry from the backend.",
9595
"parameters": [],
9696
"requestBody": {
97-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body"
97+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body"
9898
},
9999
"responses": {
100100
"200": {
101-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200"
101+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200"
102102
},
103103
"400": {
104-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400"
104+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400"
105105
},
106106
"401": {
107-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401"
107+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401"
108108
},
109109
"404": {
110-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404"
110+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404"
111111
},
112112
"500": {
113-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500"
113+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500"
114114
}
115115
}
116116
}
@@ -195,20 +195,20 @@
195195
"summary": "Sets a value under a key on the keychain backend.",
196196
"parameters": [],
197197
"requestBody": {
198-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body"
198+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body"
199199
},
200200
"responses": {
201201
"200": {
202-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200"
202+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200"
203203
},
204204
"400": {
205-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400"
205+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400"
206206
},
207207
"401": {
208-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401"
208+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401"
209209
},
210210
"500": {
211-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.5.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500"
211+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.8.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500"
212212
}
213213
}
214214
}

packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/api.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
193193
/**
194194
*
195195
* @summary Retrieves the contents of a keychain entry from the backend.
196-
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
196+
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
197197
* @param {*} [options] Override http request option.
198198
* @throws {RequiredError}
199199
*/
@@ -293,7 +293,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
293293
/**
294294
*
295295
* @summary Sets a value under a key on the keychain backend.
296-
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
296+
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
297297
* @param {*} [options] Override http request option.
298298
* @throws {RequiredError}
299299
*/
@@ -350,7 +350,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
350350
/**
351351
*
352352
* @summary Retrieves the contents of a keychain entry from the backend.
353-
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
353+
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
354354
* @param {*} [options] Override http request option.
355355
* @throws {RequiredError}
356356
*/
@@ -382,7 +382,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
382382
/**
383383
*
384384
* @summary Sets a value under a key on the keychain backend.
385-
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
385+
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
386386
* @param {*} [options] Override http request option.
387387
* @throws {RequiredError}
388388
*/
@@ -413,7 +413,7 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
413413
/**
414414
*
415415
* @summary Retrieves the contents of a keychain entry from the backend.
416-
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
416+
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
417417
* @param {*} [options] Override http request option.
418418
* @throws {RequiredError}
419419
*/
@@ -442,7 +442,7 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
442442
/**
443443
*
444444
* @summary Sets a value under a key on the keychain backend.
445-
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
445+
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
446446
* @param {*} [options] Override http request option.
447447
* @throws {RequiredError}
448448
*/
@@ -474,7 +474,7 @@ export class DefaultApi extends BaseAPI {
474474
/**
475475
*
476476
* @summary Retrieves the contents of a keychain entry from the backend.
477-
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
477+
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
478478
* @param {*} [options] Override http request option.
479479
* @throws {RequiredError}
480480
* @memberof DefaultApi
@@ -509,7 +509,7 @@ export class DefaultApi extends BaseAPI {
509509
/**
510510
*
511511
* @summary Sets a value under a key on the keychain backend.
512-
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
512+
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
513513
* @param {*} [options] Override http request option.
514514
* @throws {RequiredError}
515515
* @memberof DefaultApi

0 commit comments

Comments
 (0)