Skip to content

Commit b6ad904

Browse files
committed
ci: test that we pick up error
TICKET: WP-6702
1 parent aa19c6b commit b6ad904

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,26 @@ jobs:
428428
- name: Audit with Vacuum
429429
working-directory: modules/express
430430
run: |
431+
431432
vacuum report \
432433
--no-style \
433434
--stdout \
434435
--ruleset ruleset.yaml \
435-
api-generated.json | jq '.resultSet.results // []'
436+
api-generated.json > vacuum-report.json
437+
438+
jq '.resultSet.results // []' vacuum-report.json > vacuum-results.json
439+
440+
ERROR_COUNT=$(jq '[.[] | select(.severity == "error")] | length' vacuum-results.json)
441+
WARNING_COUNT=$(jq '[.[] | select(.severity == "warn")] | length' vacuum-results.json)
442+
443+
echo "Found $ERROR_COUNT error(s) and $WARNING_COUNT warning(s)"
444+
445+
if [ "$ERROR_COUNT" -gt 0 ]; then
446+
echo "API specification audit failed with $ERROR_COUNT error(s)"
447+
echo ""
448+
echo "Errors:"
449+
jq -r '.[] | select(.severity == "error") | " - [\(.ruleId)] \(.message) at \(.path)"' vacuum-results.json
450+
exit 1
451+
else
452+
echo "API specification audit passed!"
453+
fi

modules/express/src/typedRoutes/api/v2/generateWallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const GenerateWalletV2Query = {
103103
* @tag Express
104104
*/
105105
export const PostGenerateWallet = httpRoute({
106-
path: '/api/v2/{coin}/wallet/generate',
106+
path: '/api/v2/:coin/wallet/generate',
107107
method: 'POST',
108108
request: httpRequest({
109109
params: GenerateWalletV2Params,

0 commit comments

Comments
 (0)