In February, 2003 there was a discussion on CFC-Dev about problems using the built-in CFC Explorer in two situations:
I suggested people could build their own documentation methods quite easily. So, I decided to just do it. And thus, I give you . . .
- When trying to let people see documentation for your web service or flash remoting component
- When trying to document components outside the CF root (typically on multi-homed web servers)
CFCRemoteDocumenter is a CFML script containing the functions necessary to add easy remote documentation to any ColdFusion component. Simply use CFINCLUDE to include the contents of CFCRemoteDocumenter and you can then do something like:
[See an example using the PetStore catalogservice.cfc]
By default, this will only document REMOTE functions -- to have it document other functions, create a variable in your constructor called instance.documentedAccessLevels and make it a comma delimited list of the access levels you want to document. For instance, if you want to document both remote and public functions, you would put this in your CFC constructor:
<cfset instance.documentedAccessLevels = "remote,public">
Copyright 2003, Nathan Dintenfass (http://nathan.dintenfass.com). All Rights Reserved.
You may use this code freely provided the copyright notice above, the copyright notice in the comments of the generated HTML, and the copyright notice displayed in the HTML remain intact. If you use this for commercial purposes, you are not required to pay any royaltees, but I sure would appreciate it if you would!
USE OF THIS CODE IS AT YOUR OWN RISK. NO WARRANTY IS EXPRESSED OR IMPLIED, AND NATHAN DINTENFASS ASSUMES NO LIABILITY FOR THE RESULT OF USING THIS CODE. BY USING THIS CODE YOU AGREE TO INDEMNIFY AND HOLD NATHAN DINTENFASS HARMLESS FROM ANY LIABILITY, CLAIM OR DEMAND ARISING OUT OF YOUR USE OF THIS CODE.
Comments are welcomed at: nathan AT changemedia DOT com