Comments (7)
Hello, did you find any solution for the problem? I am facing the same problem and i still could not find a work around.
from openapi-parser.
I have the same problem.
from openapi-parser.
Same problem, any solutions?
from openapi-parser.
@theemanofsteele it works fine for me, see below.
Try to compile and run the project on this repo and reopen the ticket if your error persists.
from openapi-parser.
@theemanofsteele it works fine for me, see below.
I'd like to add that this issue is not fixed yet, I have the same problem. What @theemanofsteele said is that the provided spec (the one you tested) indeed works, but his custom spec doesn't.
I tried with my custom spec using a freshly compiled version from this repoand got the exact same error message. My spec is valid in swagger-ui, and the error messages do not add any information on where the spec supposedly is wrong.
from openapi-parser.
Sorry for the delayed response. I should have been updating sooner.
So we are still seeing this issue. However. I don't know that I feel justified to reopen it. I'll explain.
What we have discovered is that our API Spec files are almost correct. We've been using Swagger Editor and other linters to "validate" the API spec. On the surface, it seems that everything is OK. It would seem a lot of tools are fairly "forgiving" when it comes to processing/parsing a OAS file. This particular Burp extension however, is not so forgiving. For example, we had a section in one of our specs that looked similar to this (paraphrased)...
paths:
/foo/bar/v1/data:
get:
summary: Get data
tags:
- data
security:
- bearer: []
parameters:
- name: data
in: query
required: false
schema:
$ref: "#/components/schemas/data"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/dataResponse"
If you were to check this against the Swagger Editor, it would give it a "pass". But the Burp extension didn't like that. This is where we'd see the parameter4
null error. So after some trouble shooting we discovered what it was complaining about. The OAS documentation has an example on a typical paths object: https://swagger.io/specification/v3/#paths-object. Specifically, we needed to our parameter to look like this:
schema:
type: array
items:
$ref: "#/components/schemas/data"
Once we changed our specs to follow that pattern, we'd get past that error. There have been some other smaller similar issues but once we discovered this, we've been able to troubleshoot our own specs and have been able to get the Burp extension to accept our OAS files.
It's not ideal but I don't necessarily hold @aress31 at fault here. The extension parses successfully once we have the spec formatted right. It's just tough to know exactly what it wants. The error messages are no where near helpful. And at the same time, Swagger Editor and other linters are telling us our OAS files are good when in reality, they do have faults that should be caught.
Hopefully that is helpful for those following along.
RE: @JasperSurmont
from openapi-parser.
Related Issues (20)
- [BUG] Gracefully Handle lack of "servers" object HOT 1
- [BUG] Can't build HTTP request for repeater and other burp tools HOT 4
- [FEATURE] Send to Organizer HOT 2
- Suggest adapting to importing JSON files exported from Metersphere
- OpenAPI parser doesn't load the swagger file HOT 7
- Feature request: Use Hackvertor tabs HOT 1
- Error: User Token doesn't adhere to regular expression ^[a-zA-Z0-9\.\-_]+$]
- Bypass SSL error certificate HOT 6
- OpenAPI parser doesn't load the swagger file in YAML format HOT 1
- Parsing errors on various openapi specs HOT 1
- Cannot invoke "io.swagger.v3.oas.models.OpenAPI.getServers()" because "openAPI" is null HOT 2
- Issue when loading a swagger HOT 2
- Support for JSON body types HOT 1
- parseAccept throws null pointer exception when content is not set HOT 1
- Cannot invoke "io.swagger.v3.oas.models.media.Content.entrySet()" HOT 1
- Failed to build - github CI action? HOT 3
- Extension Doesnt Load Swagger File - AD credentials dont confirm to REGEX
- [BUG] issue when importing Swagger file "Cannot invoke "io.swagger.v3.oas.models.media.Content.entrySet()" HOT 6
- How to identify the parameter value in the path url ?
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 openapi-parser.