Spectral OAS2 validation throws a non-existent error without path value
See original GitHub issueRunning spectral OAS2 rules and functions sets on a OAS2 .yaml
file on all tests (2 different yaml files
) results in a cryptic error without a "path"
parameter:
{
"name": "oas2-schema",
"summary": "Validate structure of OpenAPIv2 specification.",
"message": "should NOT have additional properties: 0",
"path": [],
"severity": 50,
"severityLabel": "error"
}
Those files don’t throw any errors in any other validation tool (swagger editor, apiary, etc.). I am happy to provide them if needed.
I’m submitting a…
- bug report
- feature request
What is the current behavior?
Running:
spectral.addFunctions(oas2Functions());
spectral.addRules(oas2Rules());
const results = spectral.run(myOAS);
on a OAS2 .yaml
file
What is the expected behavior?
Do not throw this error or be more specific on it’s origin and place in the file.
What is the motivation / use case for changing the behavior?
User experience and compliance with OAS2 specification
Please tell us about your environment:
- Version: @stoplight/spectral@1.2.0
- Framework: [ ]
- Language: [all]
Other information
It also throws
oasOpParams expects a resolved object, but none was provided. Results may not be correct.
oasPathParam expects a resolved object, but none was provided. Results may not be correct.
which does not say anything of value without more explanation.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
API Linting with Spectral Keeps Getting Better - Stoplight Blog
Spectral is an open-source API linting tool by Stoplight that allows users to create custom style guides to enforce validations on API design...
Read more >Animals, Volume 9, Issue 8 (August 2019) – 112 articles
In this review, we make the point that current checking times for killing traps and snares are inadequate or nonexistent in most North...
Read more >Investigating metabolic disease in human induced pluripotent ...
Induced pluripotent stem cell differentiation enables functional validation of GWAS variants in metabolic disease. Published 2017 in Cell Stem Cell.
Read more >Adaptive History of the Chimpanzee Subspecies in the ... - TDX
Chimpanzees are our closest living genetic cousins. The species consists of four subspecies, each with a unique demographic history.
Read more >Abstracts of the Fourth World Parkinson Congress September ...
Without the Parkinson's disease he pretended everything was OK. ... manage the wide spectrum of motor and non-motor symptoms that.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jerzyn I found the cause of the issue for
x-summary
field. Posted the explanation here https://github.com/stoplightio/spectral/pull/111#issuecomment-477138102🎉 This issue has been resolved in version 2.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀