Context
Running v2.0.1 of the ruleset results in a scope.sandbox.at(...).value.in.match is not a function error when @.in.match is undefined. For an example see the "Steps to Reproduce section".
Current Behavior
Spectral crashes with a scope.sandbox.at(...).value.in.match is not a function error when @.in.match is undefined.
Expected Behavior
Spectral should not crash and should report the linting results.
Possible Workaround/Solution
Potential fix in #75
Steps to Reproduce
- Create a
.spectral.yaml file with the below contents
extends: ["@stoplight/spectral-owasp-ruleset"]
- Create an
openapi-spec.json file with the below contents
{
"openapi": "3.1.0",
"servers": [],
"paths": {},
"components": {
"schemas": {
"testSchema": {
"paths": {
"type": "object",
"properties": {
"parameters": {
"type": "array",
"description": "",
"items": {
"type": "object",
"description": "",
"properties": {
"in": {
"type": "string",
"description": ""
},
"name": {
"type": "string",
"description": ""
}
}
}
}
}
}
}
}
},
"info": {
"title": "",
"version": ""
},
"webhooks": {}
}
- Run spectral:
spectral lint openapi-spec.json
Environment
- Version used: spectral cli 6.11.0
- Environment name and version (e.g. Chrome 39, node.js 5.4): n/a
- Operating System and version (desktop or mobile): MacOs 15.6.1
- Link to your environment/workspace/project:
Context
Running
v2.0.1of the ruleset results in ascope.sandbox.at(...).value.in.match is not a functionerror when@.in.matchis undefined. For an example see the "Steps to Reproduce section".Current Behavior
Spectral crashes with a
scope.sandbox.at(...).value.in.match is not a functionerror when@.in.matchis undefined.Expected Behavior
Spectral should not crash and should report the linting results.
Possible Workaround/Solution
Potential fix in #75
Steps to Reproduce
.spectral.yamlfile with the below contentsopenapi-spec.jsonfile with the below contentsEnvironment