Comments (10)
Are you sure you're using the latest version of Swagger Parser? The require('swagger-parser').bundle()
method is simply a pass-through to require('json-schema-ref-parser').bundle()
method. There's no additional logic inside Swagger Parser, so if JSON Schema $Ref Parser works, then so should Swagger Parser.
from swagger-parser.
@BigstickCarpet, just installed it today. It's "3.4.1". BTW, swagger-cli console app also produces bad results for me.
Looks like I tried json-schema-ref-parser
version 3.1.2 and it works fine. While swagger-parser
installed 1.4.1
for itself into its own node_modules and uses it
from swagger-parser.
https://github.com/BigstickCarpet/swagger-parser/blob/master/package.json#L80
It looks like time to upgrade this dependency ;)
from swagger-parser.
I tried to make a quick fix but failed because of parse() method aguments incompatibility in SwaggerParser and $RefParser. Looks like normalizeArgs() method should be copied to SwaggerParser. But I'm not sure if it's good solution. @BigstickCarpet, do you have better idea for?
from swagger-parser.
@isadovskiy - Ah, now I remember. I was in the middle of a refactoring a few months ago, and then I started a new job and kinda dropped the ball on all my opensource projects for a while. I guess this issue will be my motivation to pick-up where I left off before. It's not as simple as upgrading the dependency or making a minor code change, unfortunately.
from swagger-parser.
@BigstickCarpet I made a change in my repo - isadovskiy@942be0c. Seems it fixed the issue. However i'm not sure about side effects. Also it's not so elegant since I copied normalizeArgs() method.
from swagger-parser.
👍 Cool. You can use that fork for now, and I'll let you know as soon as I get the permanent fix committed here.
from swagger-parser.
Thanks! i'll be waiting for solid fix.
from swagger-parser.
Looks like Options object is also incompatible...
from swagger-parser.
I'm experiencing the same issue now using either swagger parser or CLI. Was a fix made since then?
My referenced get nested into a parameter definition, leading to weird issue in Swagger Editor. On the other side, --dereference
works like a charm but leads to unused definition warnings in Swagger Editor.
Thanks for your help!
from swagger-parser.
Related Issues (20)
- Report all errors from Ajv's schema validation
- Open API 3.1 - Additional properties not allowed: $id HOT 1
- swagger-parser 10.1.0 is broken when used with npm < 7 or using --legacy-peer-deps HOT 7
- Latest version missing schema validation changes HOT 1
- Online validator is becoming unresponsive HOT 2
- Insecure Default Resolver Behavior HOT 4
- [HELP] - Please help me add this package on Vite HOT 2
- `swagger-parser@npm:10.0.2 doesn't provide openapi-types` HOT 1
- swagger version field as 'number' type is not detected in one case HOT 1
- Files over 3mb cause com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException HOT 1
- Parameterise the validator function HOT 1
- ts property continueOnError is missing from SwaggerPaser.Options
- Unable to access requestBody after dereferencing my contract yaml
- validator doesn't support anchor tags in the paths (ie /my/base/url#myAnchor) HOT 2
- Import JSON Schema as File Not Over HTTP Request HOT 2
- Not able to parse stripe openapi file HOT 2
- Update OpenAPI 3.0.0 to OpenAPI 3.1 HOT 2
- Multiple minor problems parsing docker API spec HOT 2
- Header Parameters not validated
- Support for Wildcard HTTP Responses
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 swagger-parser.