-
Notifications
You must be signed in to change notification settings - Fork 472
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
Allow docs to be generated in separate class from target #252
Conversation
Please update CHANGELOG, fix the build and squash the commits ( |
@dblock Done. Rubocop made a bunch of random code changes, and forced me to refactor for length as well. So, fair warning, this is now merge conflict bonanza. |
def as_markdown(description) | ||
description && @@markdown ? @@markdown.as_markdown(strip_heredoc(description)) : description | ||
end | ||
module GrapeSwaggerDocMethods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pull this one out into its own file?
Looks good, see my comment above and please squash these commits, too. |
Fixes the `target_class` option to fully work. The code structure here is highly questionable (no separation of concerns, for one thing). But the whole class needs some serious refactoring, so this will work until that happens, at least.
The class finally tipped the scales and Rubocop didn't like that. This is a quick fix until some more substantial refactoring takes place.
e8e808e
to
9973c7c
Compare
Ok, pulled the module out and squashed. I didn't squash the Rubocop refactoring, since those commits are totally unrelated to the actual change. That okay with you? |
This looks great, merging. |
Allow docs to be generated in separate class from target
I think this is the intention of the
target_class
option—to allow the docs for an API class to be generated in a different class. The existing implementation didn't support the full split, so I did a quick fix to change that. You can take a look at the spec I added to check that my understanding of the desired behavior is correct.