Reputation: 12299
We use Swagger to document our RESTful endpoints. Obviously this documentation is useful. However, our Camel routes are not RESTful. What's a good tool for automagically generating usage documentation for our Camel routes? We have Rabbit messages that need to be described, as well as information about what transformation the route will apply.
EDIT - Previous similar questions are 8 years old; by now surely there is a better options than writing a tool in-house. In addition, I don't only want Route documentation, I want to be able to specify rabbit message structure, and also I want the tool to produce a web page or some other easily consumable output.
EDIT 2 - What do I mean by "Rabbit message structure"? The HTTP protocol has a structure. There's a verb, there are query params, request body params, error statuses, authorization tokens, etc. That is, the messages passed back and forth between clients and endpoints have a well-defined structure, or protocol. The RabbitMQ messages being passed between my Camel routes are just as complicated since they are ultimately fulfilling RESTful requests. If two services (Camel routes) need a search string then there should be exactly one place in the message where it would be found. Further, the search parameters should be in a well-defined format. In addition, there will be items that are specific to certain services. I want to know how to specify these values, and read what they are intended for, without having to delve into code.
Another example, many services will need a user ID. I don't want a Map key called "user_id" in one service, "userid" in another, and "uid" in yet another. This very common piece of data will live in the message header and have a well-defined name that all will use.
Upvotes: 2
Views: 358
Reputation: 3191
You can use http://hawt.io/ deployed to your runtime environment and from there you can get metrics, a schematic overview of your routes and a lot more. It is also easy to setup. It can also show you what paths a message take in your routes.
Upvotes: 1