specshield 3.4.1 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/bdct.js +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specshield",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Contract compatibility testing for APIs — catch breaking OpenAPI changes before they reach your consumers, with can-i-deploy deploy gating and GitHub PR checks. (a.k.a. bidirectional contract testing.)",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
package/src/commands/bdct.js
CHANGED
|
@@ -330,7 +330,15 @@ const verifyCommand = new Command('verify')
|
|
|
330
330
|
const sev = (issue.severity || 'ERROR').toUpperCase();
|
|
331
331
|
const marker = sev === 'WARNING' ? chalk.yellow('⚠') : chalk.red('●');
|
|
332
332
|
const type = issue.type || issue.mismatchType || 'MISMATCH';
|
|
333
|
-
|
|
333
|
+
// Show the endpoint AND the field. One field can be read from several
|
|
334
|
+
// endpoints, so field alone renders genuinely distinct findings as
|
|
335
|
+
// identical lines that look like a duplicate-output bug — e.g. a
|
|
336
|
+
// `receiptUrl` removal reported once for `POST /payments` and once for
|
|
337
|
+
// `GET /payments/{paymentId}` both printed as "at $.receiptUrl".
|
|
338
|
+
const field = issue.field || issue.path || null;
|
|
339
|
+
const endpoint = issue.endpoint || null;
|
|
340
|
+
const loc = field && endpoint ? `${endpoint} ${field}`
|
|
341
|
+
: (field || endpoint || '$');
|
|
334
342
|
process.stdout.write(` ${marker} ${chalk.bold(type)} at ${chalk.gray(loc)}\n`);
|
|
335
343
|
if (issue.consumerExpects && issue.providerProvides) {
|
|
336
344
|
process.stdout.write(` ${chalk.gray(`consumer: ${issue.consumerExpects}, provider: ${issue.providerProvides}`)}\n`);
|