temando / serverless-openapi-documentation

Serverless 1.0 plugin to generate OpenAPI V3 documentation from serverless configuration
MIT License
93 stars 127 forks source link

Added fix for if no request body or parameters #16

Closed chrisgerrish closed 6 years ago

brendo commented 6 years ago

This PR is fine, but the bump of jst has caused an error in CI.

It's actually an error with the types of jst, so I've raised a PR https://github.com/jdwije/jst/pull/8 to resolve.

Once that lands, this PR can be accepted as is (and we'll do the update), or the PR can bump the dependency to beta.14 (assuming).

jkon commented 5 years ago

This PR introduced a bug which I detailed in issue #32 . The added if statements are checking the wrong object. They should be checking the documentationConfig, not the operationObj. The way this PR changed things, it totally ignores request bodies and path parameters