rabbitmq-server
rabbitmq-server copied to clipboard
Publish JSON-schema or similar documents for data returned by the JSON API
Enhancement request: It would be useful to have schema documents that could be used to determine the structure of the data returned by the HTTP API.
It's often useful to take management API data and load it into a json/document store (I put it into elasticsearch) so it can be correlated with other data. Many/most JSON-accepting, "schema-ish" document stores accept JSON-schema or similar as a means of validating and provisioning indexes for input data.
Schema are also very useful for seeing which changes were made in API data between releases, and verifying that any code that handles API data is still compatible.
Could such schema be made available for the data returned from the management API?
For example, I'm thinking of schema for objects like "queues", and "consumers/channels". The /queues endpoint currently returns an array of queue objects without an optional consumers field which can contain an array of consumer objects. The /channels endpoint returns an array of channel objects, which are pretty similar to (the same as? Without a schema, it's hard to tell) the consumer entries on an individual queue/%s endpoint.
Schemas could be (but do not necessarily have to be) linked in all documents returned from the API, or available via a static-files endpoint in the management API. Even if they were just available as documents in the git repo, they would still be very useful.