Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Read in Ansible Module DOCUMENTATION string and generate JSON schema definition #83

Open
FragmentedPacket opened this issue Feb 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@FragmentedPacket
Copy link
Contributor

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.

@dgarros dgarros added the enhancement New feature or request label Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants