@apisyouwonthate/style-guide
Advanced tools
Comparing version 1.1.10 to 1.2.0
@@ -221,2 +221,13 @@ import * as _stoplight_spectral_functions from '@stoplight/spectral-functions'; | ||
}; | ||
"adv-security-schemes-defined": { | ||
description: string; | ||
message: string; | ||
given: string; | ||
then: { | ||
field: string; | ||
function: _stoplight_spectral_core.RulesetFunctionWithValidator<unknown, null>; | ||
}; | ||
formats: _stoplight_spectral_core.Format<void>[]; | ||
severity: DiagnosticSeverity; | ||
}; | ||
}; | ||
@@ -223,0 +234,0 @@ }; |
@@ -297,2 +297,13 @@ "use strict"; | ||
severity: DiagnosticSeverity.Warning | ||
}, | ||
"adv-security-schemes-defined": { | ||
description: "All APIs MUST have a security scheme defined.", | ||
message: "This API definition does not have any security scheme defined.", | ||
given: "$..components", | ||
then: { | ||
field: "securitySchemes", | ||
function: import_spectral_functions.truthy | ||
}, | ||
formats: [import_spectral_formats.oas3], | ||
severity: DiagnosticSeverity.Error | ||
} | ||
@@ -299,0 +310,0 @@ } |
{ | ||
"name": "@apisyouwonthate/style-guide", | ||
"version": "1.1.10", | ||
"version": "1.2.0", | ||
"description": "Make your HTTP APIs better, faster, stronger, whether they are still being designed (API Design-First) or your organization has flopped various mismatched APIs into production and now you're thinking some consistency would be nice. Using Spectral and OpenAPI.", | ||
@@ -5,0 +5,0 @@ "main": "dist/ruleset.js", |
@@ -26,3 +26,3 @@ # APIs You Won't Hate: API Style Guide | ||
``` | ||
echo 'extends: ["https://unpkg.com/@apisyouwonthate/style-guide@1.1/dist/ruleset.js"]' > .spectral.yaml | ||
echo 'extends: ["https://unpkg.com/@apisyouwonthate/style-guide"]' > .spectral.yaml | ||
``` | ||
@@ -36,3 +36,3 @@ | ||
You should see some output like this, letting you know there are a few more standards you could be using (shoutout to [Standards.REST](https://standards.rest/)): | ||
You should see some output like this, letting you know there are a few more standards you could be using (shout-out to [Standards.REST](https://standards.rest/)): | ||
@@ -39,0 +39,0 @@ ``` |
@@ -281,3 +281,16 @@ /* | ||
}, | ||
// Author: Advanced API & Integrations Team (https://www.oneadvanced.com/) | ||
"adv-security-schemes-defined": { | ||
description: "All APIs MUST have a security scheme defined.", | ||
message: "This API definition does not have any security scheme defined.", | ||
given: "$..components", | ||
then: { | ||
field: "securitySchemes", | ||
function: truthy | ||
}, | ||
formats: [oas3], | ||
severity: DiagnosticSeverity.Error, | ||
}, | ||
}, | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103962
31
2066