Support @param? #6

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

Projects

None yet

6 participants

@thom-nic

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
rb2k commented Mar 5, 2012

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

@rkh
Owner
rkh commented Mar 5, 2012

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

@jimlar
Contributor
jimlar commented Aug 28, 2012

I've added a pull request that should fix this

@darrenleeweber

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

@ruliana
ruliana commented Nov 13, 2014

Any news on this?

@rkh
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 notifications@github.com
wrote:

Any news on this?


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

@ruliana
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
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 notifications@github.com
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