question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spectral OAS2 validation throws a non-existent error without path value

See original GitHub issue

Running 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:

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:closed
  • Created 4 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
P0lipcommented, Mar 27, 2019

@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

0reactions
stoplight-botcommented, Mar 28, 2019

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found