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

Allow docs to be generated in separate class from target #252

Merged
merged 3 commits into from
May 1, 2015

Conversation

iangreenleaf
Copy link
Contributor

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.

@dblock
Copy link
Member

dblock commented Apr 29, 2015

Please update CHANGELOG, fix the build and squash the commits (rubocop -a will do the job). I'll take a closer look at the code.

@iangreenleaf
Copy link
Contributor Author

@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
Copy link
Member

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?

@dblock
Copy link
Member

dblock commented Apr 30, 2015

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.
@iangreenleaf
Copy link
Contributor Author

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?

@dblock
Copy link
Member

dblock commented May 1, 2015

This looks great, merging.

dblock added a commit that referenced this pull request May 1, 2015
Allow docs to be generated in separate class from target
@dblock dblock merged commit c2d74ff into ruby-grape:master May 1, 2015
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