Created
April 26, 2021 14:51
-
-
Save mcroissant/b47ff530d521f0f4ca502e6e7cbd2bf8 to your computer and use it in GitHub Desktop.
Spectral custom rule to check https
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends: spectral:oas | |
rules: | |
endpoint-should-be-https: | |
description: Endpoints should be using https | |
given: $.servers[*] | |
severity: error | |
then: | |
field: url | |
function: pattern | |
functionOptions: | |
match: "^https" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment