Skip to content

Commit b270d28

Browse files
elenaizaguirrepetermetz
authored andcommitted
fix: openapi validation for keychain-aws-sm plugin
Includes tests for endpoints setKeychainEntry, getKeychainEntryV1, hasKeychainEntryV1 and deleteKeychainEntryV1, each of them with test cases: - Right request - Request including an invalid parameter - Request without a required parameter Relationed with #847 Signed-off-by: Elena Izaguirre <[email protected]>
1 parent 51bf753 commit b270d28

File tree

4 files changed

+390
-65
lines changed

4 files changed

+390
-65
lines changed

packages/cactus-plugin-keychain-aws-sm/src/main/json/openapi.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@
3535
"summary": "Retrieves the contents of a keychain entry from the backend.",
3636
"parameters": [],
3737
"requestBody": {
38-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body"
38+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_get_entry_request_body"
3939
},
4040
"responses": {
4141
"200": {
42-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200"
42+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_200"
4343
},
4444
"400": {
45-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400"
45+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_400"
4646
},
4747
"401": {
48-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401"
48+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_401"
4949
},
5050
"404": {
51-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404"
51+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_404"
5252
},
5353
"500": {
54-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500"
54+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_get_entry_500"
5555
}
5656
}
5757
}
@@ -68,20 +68,20 @@
6868
"summary": "Sets a value under a key on the keychain backend.",
6969
"parameters": [],
7070
"requestBody": {
71-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body"
71+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_set_entry_request_body"
7272
},
7373
"responses": {
7474
"200": {
75-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200"
75+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_200"
7676
},
7777
"400": {
78-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400"
78+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_400"
7979
},
8080
"401": {
81-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401"
81+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_401"
8282
},
8383
"500": {
84-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500"
84+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_set_entry_500"
8585
}
8686
}
8787
}
@@ -98,20 +98,20 @@
9898
"summary": "Deletes an entry under a key on the keychain backend.",
9999
"parameters": [],
100100
"requestBody": {
101-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body"
101+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_delete_entry_request_body"
102102
},
103103
"responses": {
104104
"200": {
105-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200"
105+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_200"
106106
},
107107
"400": {
108-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400"
108+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_400"
109109
},
110110
"401": {
111-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401"
111+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_401"
112112
},
113113
"500": {
114-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500"
114+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_delete_entry_500"
115115
}
116116
}
117117
}
@@ -128,20 +128,20 @@
128128
"summary": "Checks that an entry exists under a key on the keychain backend",
129129
"parameters": [],
130130
"requestBody": {
131-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body"
131+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/keychain_has_entry_request_body"
132132
},
133133
"responses": {
134134
"200": {
135-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200"
135+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_200"
136136
},
137137
"400": {
138-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400"
138+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_400"
139139
},
140140
"401": {
141-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401"
141+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_401"
142142
},
143143
"500": {
144-
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v0.9.0/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500"
144+
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v1.0.0-rc.2/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/keychain_has_entry_500"
145145
}
146146
}
147147
}

0 commit comments

Comments
 (0)