[coldbox 3.1] getMetaData

Hey guys,

I’m looking to building a module that reads the meta data of a handlers function to produce some documentation. I was wondering if anyone can point me in the direction of somewhere this might be used within the coldbox framework in order to get some ideas.

Thanks!

Nolan

I found this article by Dan Vega which provided some useful information:

Here is the function and annotations:

/**

  • @httpMethod GET
  • @description I am the component description
  • @hint I do something

Anyone have any ideas on this one?

Thanks!

N

Yes it is a cf bug. Do arg.hint on each

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

can you provide me with an example? I don’t understand.

Hey Luis,

I haven’t been able to get this to work. Would you be able to provide me an example or is there someplace in the framework that uses this fix?

Thanks again.

Nolan

Here you go, this worked for me

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Test.cfc (210 Bytes)

That’s really weird. It still doesn’t work for me.

I still get…

FUNCTIONS
array
1
struct
HTTPMETHOD GET * @description I am the component description * @hint I do something
NAME index
PARAMETERS
array [empty]

What version of CF are you running? and What OS?

Can anyone else get this to work on ACF 9.0.1 on OSX?

Thanks.

Nolan

That is what I got

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

How do you get each of the annotations to be its own struct element?

Nolan Dubeau

Load .,8,1

With the code I sent you.

Are you sure, you don’t have empty whitespaces

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

yep, no whitespace. i copied and pasted your code exactly.

do you get struct elements for httpMethod, description, and hint? or do you just get httpMethod?

thx.

All of them

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

wtf? what version of CF are you using?

this doesn’t make any sense.

doh!

also, i’m now testing this on 3.5, instead of 3.1.

9.01 on Mac.

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

Back to your original question, have you looked at http://colddoc.riaforge.org/ to see how it works?

Thanks!

~Brad

Thanks Brad! I haven’t looked at ColdDoc yet.

Nolan Dubeau

Load .,8,1