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

Support @param? #6

Open
thom-nic opened this issue Feb 21, 2012 · 8 comments
Open

Support @param? #6

thom-nic opened this issue Feb 21, 2012 · 8 comments

Comments

@thom-nic
Copy link

The plugin seems to happily generate the doc (despite the Undocumentable method, missing name warnings mentioned in another issue.)

So my source looks like this:

# Retrieve child node IDs from a given node ID
#
# @param [Number] nodeID path arg the node identifier to search
# @return [Array] a list of child IDs
get '/node/:nodeID/children' do

And the generated doc looks like this:

- (Array) GET '/node/:nodeID/children'

Retrieve descendant node IDs from a given node ID

Returns:
    * (Array) — a list of child IDs

So it looks like my @param tags are getting dropped from the generated doc. This is even more important if @param is documenting URL query parameters that aren't visible in the path route.

Also, what would be the recommended method of documenting a POST body? A @body tag would be nice :) Thanks!

@rb2k
Copy link

rb2k commented Mar 5, 2012

I'd be interested in a working "param"-tag too

@rkh
Copy link
Owner

rkh commented Mar 5, 2012

Do you have an idea how to implement this, @tjeden?

@jimlar
Copy link
Contributor

jimlar commented Aug 28, 2012

I've added a pull request that should fix this

@dazza-codes
Copy link

Well, I see this code based is getting outdated, but I'm noting that this issue is not fixed.

@ruliana
Copy link

ruliana commented Nov 13, 2014

Any news on this?

@rkh
Copy link
Owner

rkh commented Nov 14, 2014

No. I'm not using yard-sinatra myself and have (unsuccessfully) handed over
maintenance a few times. Apologies, but due to time constraints on my end I
don't see myself working on it any time soon.

On Thu, Nov 13, 2014 at 7:18 PM, Ronie Uliana [email protected]
wrote:

Any news on this?


Reply to this email directly or view it on GitHub
#6 (comment).

@ruliana
Copy link

ruliana commented Nov 14, 2014

Thank you for the reply, Konstantin. It happens I searched a little more for a solution and found this: https://github.com/lsegal/yard/wiki/SinatraRoutes. The route format in the final doc is a little awkward ('get("/my/route")), but it does the work.

I'll leave this message here in case anybody have the same problem.

@rkh
Copy link
Owner

rkh commented Nov 14, 2014

Oh, that's pretty sweet, should maybe add it to the repo.

On Fri, Nov 14, 2014 at 11:21 AM, Ronie Uliana [email protected]
wrote:

Thank you for the reply, Konstantin. It happens I searched a little more
for a solution and found this:
https://github.com/lsegal/yard/wiki/SinatraRoutes. The route format in
the final doc is a little awkward ('get("/my/route")), but it does the work.

I'll leave this message here in case anybody have the same problem.


Reply to this email directly or view it on GitHub
#6 (comment).

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

No branches or pull requests

6 participants