specshield 1.0.9 → 1.0.11

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specshield",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "CLI to compare OpenAPI/Swagger specs and detect breaking changes for CI/CD pipelines and local developer workflows.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -366,7 +366,7 @@ const verifyCommand = new Command('verify')
366
366
  return;
367
367
  }
368
368
 
369
- const summary = result.summary || {};
369
+ const summary = result.resultSummary || result.summary || {};
370
370
  const total = summary.total ?? 0;
371
371
  const passed = summary.passed ?? 0;
372
372
  const failed = summary.failed ?? 0;
@@ -153,7 +153,7 @@ function toParamMap(params) {
153
153
 
154
154
  function diffResponses(path, method, baseResponses, targetResponses, diffs) {
155
155
  for (const statusCode of Object.keys(baseResponses)) {
156
- if (!targetResponses[statusCode]) {
156
+ if (!(statusCode in targetResponses)) {
157
157
  diffs.push({
158
158
  type: 'RESPONSE_REMOVED',
159
159
  path,
@@ -167,7 +167,7 @@ function diffResponses(path, method, baseResponses, targetResponses, diffs) {
167
167
  }
168
168
 
169
169
  for (const statusCode of Object.keys(targetResponses)) {
170
- if (!baseResponses[statusCode]) {
170
+ if (!(statusCode in baseResponses)) {
171
171
  diffs.push({
172
172
  type: 'RESPONSE_ADDED',
173
173
  path,