+1 Annotations about the usage of an endpoint would help though, imho. It would provide the missing info (that needs documenting) like if it's required, a secret, etc. While it could be done in javadoc, an annotation could be used in the code to not printout things like passwords for instance.
Thanks, Hadrian On Apr 21, 2011, at 8:38 AM, James Strachan wrote: > Wouldn't a tool using a combination of introspection & javadoc help > make sure the documentation is up to date & valid? It'd work on most > endpoints today without much extra work. Adding extra annotations > could help; but I'd rather have better tools so that code can be more > DRY. e.g. it seems silly annotating fields with the property name & > type - when thats easily discoverable via introspection - and the > description could be taken by default from the setter method javadoc > if there is no annotation available. > > BTW the URIs normally relate to the Endpoints not the Components per se. > > On 20 April 2011 15:50, Charles Moulliard <cmoulli...@gmail.com> wrote: >> Hi, >> >> I would like to suggest that we add annotation to document the >> properties of the Camel Component class which are used customise the >> component according to the keys defined into the URIs. >> >> What do you about that ? >> >> idea >> >> URI => componentName:property1:property2....?key1=value&key2=value ..... >> >> @CamelComponent(name="","description="",example="", pageUrl="") >> public class Component { >> >> @CamelComponentKey(name="", description="", type="boolean, string") >> String key1; >> >> @CamelComponentKey(name="", description="", type="boolean, string") >> String key2; >> >> String key3; >> ... >> } >> >> We could use those annotations to document camel component (when >> generating pdf, html, ...) or provide URI definition when using >> autocompletion in Eclipse, IntelliJ, .... >> >> Regards, >> >> Charles Moulliard >> >> Sr. Principal Solution Architect - FuseSource >> Apache Committer >> >> Blog : http://cmoulliard.blogspot.com >> Twitter : http://twitter.com/cmoulliard >> Linkedin : http://www.linkedin.com/in/charlesmoulliard >> Skype: cmoulliard >> > > > > -- > James > ------- > FuseSource > Email: ja...@fusesource.com > Web: http://fusesource.com > Twitter: jstrachan, fusenews > Blog: http://macstrac.blogspot.com/ > > Connect at CamelOne May 24-26 > The Open Source Integration Conference > http://camelone.com/