ruby-grape / grape-swagger

Add OAPI/swagger v2.0 compliant documentation to your grape API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add_swagger_documentation not working with grape >= 1.2.0

darcang opened this issue · comments

After introducing this change by Grape https://github.com/ruby-grape/grape/pull/1803/files#diff-f411a5009131db5a6c7242b49ca78488f2d274ef9e5e5f4de9262a42108a5386R8-R13
add_swagger_documentation raises an error 'NoMethodError: undefined method `endpoints' for module' from https://github.com/ruby-grape/grape-swagger/blob/master/lib/grape-swagger.rb#L154
For some reason, the target_class here is the module instead of a class

maybe updating/upgrade your app will help 😉

your referenced grape changes are relatively old and grape-swagger works well together since their introduction, see also CI pipeline results