| = Endpoint Annotations |
| |
| You can annotate xref:endpoint.adoc[Endpoint] and |
| Consumer classes so that their configuration documentation can be |
| automatically generated by the camel-package-maven-plugin (rather like |
| maven plugin goals get their parameters documented automatically). |
| |
| The documentation is then included into the jar as |
| org/apache/camel/component/scheme/scheme.adoc where scheme is the |
| component name. |
| |
| == Supported annotations |
| |
| [width="100%",cols="50%,50%",options="header",] |
| |======================================================================= |
| |Annotation |Description |
| |@UriEndpoint |Specifies that an endpoint is annotated with @UriParam |
| and/or @UriParams annotations. Also specifies the default scheme to use |
| in the generated documentation, and other informations |
| |
| |@UriParam |Used to annotate a parameter value; usually specified via |
| ?foo=bar syntax in the URI strings in Camel. Used currently only on |
| field declarations but in the future could be used on setter methods |
| too. If no name is specified then the name of the field/setter property |
| is used. |
| |
| |@UriParams |Specifies that a field is a nested object of one or more |
| configuration parameters; then the class of this field should be |
| annotated with one or more @UriParam or @UriParams annotations |
| |
| |@Metadata | Used for special situations to provide additional information |
| |======================================================================= |
| |
| For example see the `TimerEndpoint` from the `camel-timer` component and |
| notice how its using these annotations. |
| |
| Not only are the annotations useful for automatically generating the |
| documentation; we can use them to refine the validation of the code |
| during configuration and they can be useful for tool providers so they |
| can more easily introspect the configuration options. |
| |