- edited description
[v2.0] Not validating ref'd request bodies on openapi 3.0
There was a bug (and potentially a breaking change) in the swagger-request-validator v2 that prevents it from correctly parsing request bodies.
Here's the issue that has been fixed with details on their bug.
It also turns out that in the swagger parser v2, you'll want to consider using
parseOptions.setResolveFully(true)
instead of parseOptions.setResolve(true)
. (Details on this are also in the linked issue from swagger-parser above.) As of 10/3/18, this fix has not been cut in a release, but it looks like it'll be 2.0.6.
There is an example openAPI v3 file in the linked github issue as well that could be used for testing.
Comments (8)
-
reporter -
reporter - edited description
-
Thanks for raising this!
From my reading, this will only affect specs that use a referenced
requestBody
? (e.g. inline body definitions and ref'd schemas will work ok) -
reporter I believe so. That's how I ended up running into it.
-
reporter -
- changed status to open
-
- changed title to [v2.0] Not validating ref'd request bodies on openapi 3.0
-
- changed status to resolved
Available in v2.0.1
- Log in to comment