Bryan,
I do have many annotations on the Processor class. The problem is
that documentation is not being generated automatically. I don't see
any errors, so I have been unable to determine why it's not being
generated. The processors appear in NiFi and I'm able to search for
them via the tags I specified. It's just the documentation that's not
appearing.
Thanks for the note on where to put the additional details file. That
wasn't clear from the documentation. I'll give it a try.
David P.
On 2019/08/26 15:21:12, Bryan Bende wrote: > Hello,> > > The
documentation for a processor is generated automatically from the> >
annotations on the processors. If you used the Maven Archetype to> >
generate your NAR then you should already have a starting point for> >
this with the example MyProcessor which has the following
annotations:> > > @Tags({"example"})> >
@CapabilityDescription("Provide a description")> > @SeeAlso({})> >
@ReadsAttributes({@ReadsAttribute(attribute="", description="")})> >
@WritesAttributes({@WritesAttribute(attribute="", description="")})> >
> For the additionalDetails.html, it may help you to look at how it
is> > setup in the existing NARs:> > >
https://github.com/apache/nifi/tree/master/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-2-0-processors/src/main/resources/docs>
> > In the processors Maven module, the location would be> >
"src/main/resources/docs/{fully-qualified-component-name}/additionalDetails.html">
> > On Fri, Aug 23, 2019 at 3:43 PM David Perkins wrote:> > >> > >
Hello,> > > I'm having trouble generating documentation for a set of
custom NiFi> > > processors. I posted a question with all the details
here on Stack> > > Overflow.> > >
https://stackoverflow.com/questions/57530465/how-to-generate-usage-documentation-for-custom-processors>
> >> > > Below is a copy of what I posted. Thanks for any help with
this.> > >> > > David P.> > >> > >> > > I have created several custom
NiFi processors, but have been unable to> > > get usage documentation
to be generated. 'Usage' documentation refers> > > to right clicking
on a processor and selecting 'Usage', which should> > > bring up
documentation about that specific processor. The> > > documentation
panel is displayed, but none of my custom processors are> > >
present.> > >> > > I used several NiFi documentation tags on my custom
processor classes> > > including several Read/Written attributes. The
code compiles and unit> > > tests without any issues. The build
reports> > >> > > [INFO] Generating documentation for NiFi extensions
in the NAR...> > >> > > According to the developer guide documentation
is supposed to> > > automatically be generated.> > >> > > I also tried
creating an additionalDetails.html file and putting it in> > > the nar
according the documentation.> > >> > > This file should exist within a
directory whose name is the> > > fully-qualified name of the
Processor, and this directory’s parent> > > should be named docs and
exist in the root of the Processor’s jar.> > >> > > However, that
broke NiFi and I found this in the logs.> > >> > > === End Processor
types ===> > > 2019-08-16 15:16:36,100 WARN [main]> > >
org.apache.nifi.web.server.JettyServer Failed to start web server...>
> > shutting down.> > > java.lang.NullPointerException: null> > > at
org.apache.nifi.documentation.DocGenerator.generate(DocGenerator.java:62)>
> > at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:932)>
> > at org.apache.nifi.NiFi.(NiFi.java:158)> > > at
org.apache.nifi.NiFi.(NiFi.java:72)> > > at
org.apache.nifi.NiFi.main(NiFi.java:297)> > > 2019-08-16 15:16:36,100
INFO [Thread-1] org.apache.nifi.NiFi> > > Initiating shutdown of Jetty
web server...> > >> > > I'm using the standard nifi-nar-maven-plugin
to generate the nar file.> > > Here's a snippet of my pom.xmlfile.> >
>> > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">; > >
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0>; > >
http://maven.apache.org/maven-v4_0_0.xsd">;>; > > 4.0.0> > >
com.myorg> > > nifi-mylib> > > nar> > > 0.0.3> > > nifi-mylib> > >> >
> > > > UTF-8> > > 1.8> > > 1.8> > > 1.9.2> > > > > >> > > > > > > > >
org.apache.nifi> > > nifi-api> > > ${nifi.version}> > > > > > ...> > >
> > >> > > > > > > > > > > > org.apache.nifi> > >
nifi-nar-maven-plugin> > > 1.3.1> > > true> > > > > > > > >
org.apache.maven.plugins> > > maven-surefire-plugin> > > 2.15> > > > >
> > > > > > > > > >> > > The generated .nar (without the
additionalDetails.html file) load> > > correctly and appear in the
list of processors. It's just the Usage> > > documentation that I
can't get to work.> >