api-quality-spectral-ruleset 1.4.1-beta.2 → 1.4.1-beta.3

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.
@@ -20,10 +20,13 @@ module.exports = (given, options, context) => {
20
20
  .map((code) => String(code).trim())
21
21
  .filter(Boolean);
22
22
 
23
+ const operationSecurityDefined = Array.isArray(given.security);
24
+ if (operationSecurityDefined && given.security.length === 0) {
25
+ return results;
26
+ }
27
+
23
28
  // Check if this operation has security defined
24
- const operationHasSecurity = given.security &&
25
- Array.isArray(given.security) &&
26
- given.security.length > 0;
29
+ const operationHasSecurity = operationSecurityDefined && given.security.length > 0;
27
30
 
28
31
  // Check if there's global security in the document
29
32
  let globalHasSecurity = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-quality-spectral-ruleset",
3
- "version": "1.4.1-beta.2",
3
+ "version": "1.4.1-beta.3",
4
4
  "description": "Spectral ruleset by API Quality",
5
5
  "main": "apq-spectral.yaml",
6
6
  "files": [