Comments (4)
@philsturgeon do you think this could be related to Mermade/oas-kit#78 or is it a separate issue?
from speccy.
Sadly not @MikeRalphson, it's only when using -j
and the invalid type is in a JSON Schema file.
The json-schema-to-openapi-schema library is throwing an exception that the oas-kit filter logic is not expecting.
▶ node speccy lint test/samples/json-schema/openapi.yaml -j --verbose
GET /Users/philsturgeon/src/speccy/rules/default.json
.. snip ..
GET test/samples/json-schema/openapi.yaml
GET /Users/philsturgeon/src/speccy/test/samples/json-schema/a.json
{ Error
at Object.<anonymous> (/Users/philsturgeon/src/speccy/node_modules/json-schema-to-openapi-schema/index.js:8:30)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/philsturgeon/src/speccy/lint.js:9:24)
at Module._compile (internal/modules/cjs/loader.js:689:30)
name: 'InvalidTypeError',
message: 'Type "foo" is not a valid type' }
ReferenceError: err is not defined
at /Users/philsturgeon/src/speccy/node_modules/oas-resolver/index.js:215:26
ReferenceError: err is not defined
at /Users/philsturgeon/src/speccy/node_modules/oas-resolver/index.js:215:26
err is not defined
Not sure what to do about this.
from speccy.
@philsturgeon The throwing of the undefined err
(when it should be ex
) is fixed in oas-resolver v1.0.10
from speccy.
Confirmed! Thank you so much @MikeRalphson.
$ speccy lint test/samples/json-schema/openapi.yaml -j
err is not defined
$ node speccy lint test/samples/json-schema/openapi.yaml -j
Type "foo" is not a valid type
This will be fixed by #181.
from speccy.
Related Issues (20)
- False positive (lint and resolve) with referenced ($ref) examples HOT 1
- Rule path-keys-no-trailing-slash: throws lint error when path is a single slash HOT 2
- Passing "resolveInternal" option causes "RangeError" when resolving a spec HOT 6
- Hangs resolving external references with NodeJS >= 12.17.0 HOT 3
- Don't resolve internal reference HOT 1
- Multi $ref ? HOT 2
- Support for Async API HOT 1
- lint: Cannot read property 'failed' of undefined HOT 4
- resolve does not import tags HOT 1
- securitySchemes property "in" should be required HOT 1
- speccy serve redoc try HOT 1
- Access to every item on operation's parameters object HOT 1
- Implicit map keys need to be on a single line
- how to combine $ref and default? HOT 1
- The website is down (again)
- Adding SARIF result format support for speccy
- Is this project active? HOT 3
- Speccy lint whole project using gradle/maven build
- reused json schema is only converted once
- If an object just ref another object, the progress will be blocked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speccy.