FlowRESTdoc (zero.assemble.flow.restdoc)
zero.restdoc.webtools). The FlowRESTdoc tool generates HTML tables that describe the RESTful APIs of Assemble flow in your application and its dependencies.
The following sections of this article describe how to use FlowRESTdoc.
Adding zero.assemble.flow.restdoc to your application
FlowRESTdoc is currently available in the experimental module group.
FlowRESTdoc functionality is added to your application as a dependency. Start by adding the following line to the dependencies element in your config/ivy.xml file:
Run zero resolve to complete the process.
Viewing the Flow REST API documentation
After adding zero.assemble.flow.restdoc to your application, start your WebSphere® sMash application and visit the flow REST documentation (by default,
http://localhost:8080/flowrestdoc
) in your favorite browser. You should see an index page that lists all of the flows in your application. Clicking on a link and it brings you to the REST API of the flow.
- Currently, the REST API of Assemble flow contains only URIs, HTTP methods and data formats.
- These REST API depends on what activity you use in flow. I.e., only includes the activity that could accept HTTP request, such as
receiveGET,receivePOSTorpick.
Generating static documentation
When deploying your WebSphere sMash application in a production environment, you can replace the RESTdoc dynamic table generation with static files (because the APIs are not changing like during development). Run the zero flowrestdoc command; FlowRESTdoc puts the documentation files in /public/flowdocs and their content does not change unless you re-run the command.