JSON schema for ansible-doc?

I have written a Neovim plugin (ansible-doc.nvim) which lets me browse the documentation of Ansible modules directly from within the editor. It parses the JSON output from ansible-doc -j and formats it to something that’s pleasant to the eye.

My question is whether there is an official JSON schema or some other specification. For now I have picked a select few documents, looked at their structure and come up with some ad-hoc renderer. However, every now and then I come across a document which does not match my assumptions. Without a proper definition the best I can do is trial and error over and over again, which is something I want to avoid.

While there is a minimal expected schema for ansible-doc, it does not strictly enforce one and allows for user fields. For example if a company needs to add ‘Authorized_for: groupname’ to plugins, they can and we will present it and ignore it.

The validations/tests to include in core or certified collections do a strict validation and that schema is implemented in the validate-modules subsystem of ansible-test, specifically in ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py at devel · ansible/ansible · GitHub