Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] Stop swagger generation from crashing (if a controller's parent doesn't define a resource_description block) #637

Conversation

enrique-guillen
Copy link
Contributor

@enrique-guillen enrique-guillen commented Oct 17, 2018

The original feature release caused Apipie's swagger generator (rake apipie:static_swagger_json) to crash with this error:

NoMethodError: undefined method `_tag_list_arg’ for nil:NilClass

Unless you happened to define a resource_description for the parent class of a controller. (It turns out the parent variable isn't always a resource-desc object.)

This makes sure _tag_list_arg is called on non-nil objects only. I marked this as a bugfix because the error message you get doesn't explain how to fix it, and we shouldn't have to define resource_description for the parent classes.

0.5.11 should be marked as faulty. Sorry about that.

@iNecas iNecas merged commit 68e27ff into Apipie:master Oct 19, 2018
@iNecas
Copy link
Member

iNecas commented Oct 19, 2018

apipie-rails-0.5.13 with this fix pushed to rubygems. Thanks @enrique-guillen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants