I have a message oriented middleware, what I am trying to do is document all the messages that you can send, which we have in a folder with json schemas, this is one of our schemas, they are all very simple messages:
"{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Cumulus coupon",
"description": "Send a message about a user that got a new coupon.",
"type": "object",
"example": {
"cumulus-number": "2099412220012",
"coupon-id": "1234567"
},
"properties": {
"cumulus-number": {
"description": "Cumulus number",
"type": "string",
"pattern": "^2099[0-9]{9}$"
},
"coupon-id": {
"description": "A coupon information ID. See https://api.migros.ch/coupons.json",
"type": "string"
}
},
"required": ["cumulus-number", "coupon-id"],
"additionalProperties": false
}”
If I from that folder could generate swagger docs, where you can also use the sandbox to send the message from the “example” part in the schema it would be pretty neat and easy documentation for everyone to use, from a google search I could not find anything that does what I want, so currently in the process to implement it myself.