[v2.0] Not validating ref'd request bodies on openapi 3.0

Issue #165 resolved
Nick Kringle created an issue

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)

  1. James Navin

    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)

  2. Log in to comment