My application publishes various messages (e.g., telemetry, changed-events, ...) to a RabbitMQ message-broker. The users have no access to the source-code and therefore, will need a separate documentation with all available exchanges, messages and their JSON payload.
How can i create/generate a documentation with this information classes like the following:
public class SensorMessagePublisher
{
public void PublishTemperatureChangedMessage(string sensorId, int temperature)
{
//serialize parameters to JSON
//call RabbitMQ-Client to publish message
}
public void PublishSensorConfigurationChangedMessage(List<Sensor> sensors)
{
//serialize parameters to JSON
//call RabbitMQ-Client to publish message
}
}
I have already looked at AsyncAPI, but their tools (e.g., Saunter) generate documentation only at runtime. Are there alternatives that provide an equivalent or similar approach at build time? Are there already best practices for such a widely used approach/tool?