Feature Request: Read in Ansible Module DOCUMENTATION string and generate JSON schema definition
Environment
- Python version: 3.8
- schema-enforcer version: 1.0.0
Proposed Functionality
Provide a CLI tool that can either read from a directory of Ansible modules, take a collection, etc. (and these can be phased) and generate a JSON schema from the module's argspec.
Use Case
We have a client today that we're using Schema Enforcer and building custom Ansible modules and we're looking to cover cases that Ansible doesn't currently cover such as BGP ASN enforcement, IP addresses, etc.
We created a PoC for reading the modules DOCUMENTATION string and generating a JSON schema compliant file and then would obviously require manual intervention to specify the specific definitions.
We think this would be useful for others that need to augment the built in Ansible arg spec validations since it pretty only does enum and type casting/checking.