Features#
Everything the generator emits, in one pass over the flow file.
- One
index.mdentry point: flow summary, process group index, parameter contexts and controller services. - One file per process group under
process-groups/, with breadcrumb links back to the main document and up to the parent group. - Mermaid
flowchartper group, node shapes encoding the mapped EIP pattern. - Processor tables with type, mapped pattern, schedule and full property tables.
- Connections, input/output ports, child groups, remote process groups, funnels and canvas labels documented per group.
- Sensitive values (properties and parameters) masked as
********, long values truncated.
Build#
Requires JDK 17+ and Gradle (no wrapper checked in; use a local Gradle 8.x).
gradle build # compiles, runs tests, builds build/libs/nifi2md-<version>-all.jar gradle fatJar # just the executable uber-jar gradle run --args="path/to/ACME.json"
Usage#
java -jar build/libs/nifi2md-0.1.0-all.jar test/ACME.json
Default output: a <input name>-docs/ directory next to the input file.
test/ACME-docs/ ├── index.md # summary, parameter contexts, services, group index └── process-groups/ ├── acme.md # root group: diagram + processors + connections ├── acme-service-1.md └── ...
Options#
| Option | Default | Description |
|---|---|---|
-o, --output <dir> | <input name>-docs | Output directory |
-t, --title <title> | root process group name | Documentation title |
-d, --direction <dir> | LR | Mermaid layout: LR, RL, TB, TD, BT |
--no-diagrams | off | Skip Mermaid diagrams |
--no-properties | off | Skip component property tables |
--max-property-length <n> | 200 | Truncate property values (0 = no truncation) |
-q, --quiet | off | Do not print written files |
-h, --help | Help | |
-V, --version | Version |
Generated documentation#
Files cross-reference each other with relative links, so the output works on a documentation site, in a Markdown viewer, or on GitHub as-is.
index.md
Flow summary (counts of groups, processors, connections, ports, services), process group index tree, parameter contexts with masked sensitive values, controller services with configuration.
process-groups/<group>.md
Breadcrumb links, mermaid flowchart, processor table with mapped
integration pattern, connections, ports, child group links, services,
remote groups, funnels and canvas labels.
Diagram conventions#
| Node | Meaning |
|---|---|
([ name ]) stadium | Endpoint processor, or process group port |
{ name } rhombus | Message router |
{{ name }} hexagon | Splitter / aggregator / recipient list |
[/ name /] trapezoid | Message translator |
( name ) round | Processor without a mapped pattern |
[[ name ]] subroutine | Nested process group (opens its own page) |
Connections pointing at a port of a child group are drawn against that child group node, so each level stays readable.
flowchart LR
fetch([Fetch orders]) -->|success| route{Route by type}
route -->|order| split{{Split lines}}
route -->|invoice| billing[[Billing]]
split --> persist([Persist])
Project layout#
src/main/java/fr/giwi/nifi2md/ ├── Main.java # picocli CLI ├── model/ # Jackson-mapped NiFi flow model + FlowParser ├── eip/ # EipPattern, EipCatalog (NiFi type -> EIP pattern) └── render/ # MermaidRenderer, MarkdownGenerator, Texts
License#
GNU General Public License v3.0, see LICENSE.
Every source file carries SPDX-License-Identifier: GPL-3.0.