Skip to content

Commit

Permalink
fix: openapi validation test for keychain-vault plugin
Browse files Browse the repository at this point in the history
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 #1329

Relationed with #847

Signed-off-by: Elena Izaguirre <e.izaguirre.equiza@accenture.com>
  • Loading branch information
elenaizaguirre authored and petermetz committed Sep 18, 2021
1 parent c568ad3 commit 6630ebe
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 19 deletions.
22 changes: 11 additions & 11 deletions packages/cactus-plugin-keychain-vault/src/main/json/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@
"summary": "Retrieves the contents of a keychain entry from the backend.",
"parameters": [],
"requestBody": {
"$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"
"$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"
},
"responses": {
"200": {
"$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"
"$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"
},
"400": {
"$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"
"$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"
},
"401": {
"$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"
"$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"
},
"404": {
"$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"
"$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"
},
"500": {
"$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"
"$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"
}
}
}
Expand Down Expand Up @@ -195,20 +195,20 @@
"summary": "Sets a value under a key on the keychain backend.",
"parameters": [],
"requestBody": {
"$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"
"$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"
},
"responses": {
"200": {
"$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"
"$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"
},
"400": {
"$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"
"$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"
},
"401": {
"$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"
"$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"
},
"500": {
"$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"
"$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"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
/**
*
* @summary Retrieves the contents of a keychain entry from the backend.
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -293,7 +293,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
/**
*
* @summary Sets a value under a key on the keychain backend.
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -350,7 +350,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
/**
*
* @summary Retrieves the contents of a keychain entry from the backend.
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -382,7 +382,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
/**
*
* @summary Sets a value under a key on the keychain backend.
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -413,7 +413,7 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
/**
*
* @summary Retrieves the contents of a keychain entry from the backend.
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -442,7 +442,7 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
/**
*
* @summary Sets a value under a key on the keychain backend.
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
Expand Down Expand Up @@ -474,7 +474,7 @@ export class DefaultApi extends BaseAPI {
/**
*
* @summary Retrieves the contents of a keychain entry from the backend.
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Requst body to obtain a keychain entry via its key
* @param {GetKeychainEntryRequest} getKeychainEntryRequest Request body to obtain a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
Expand Down Expand Up @@ -509,7 +509,7 @@ export class DefaultApi extends BaseAPI {
/**
*
* @summary Sets a value under a key on the keychain backend.
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Requst body to write/update a keychain entry via its key
* @param {SetKeychainEntryRequest} setKeychainEntryRequest Request body to write/update a keychain entry via its key
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
Expand Down
Loading

0 comments on commit 6630ebe

Please sign in to comment.