To help module developers check their implementations of modules, we designed module validator CLI (Command-Line Interface). It is a simple tool that will help you verify the basic requirements for the modules, i.e. module's yaml file, DockerHub resources, external links, etc.
Current version of the module validator supports the following commands:
validate yaml-schema- provides a basic validation of the module's YAML file, so it checks if all required fields are provided and if their structure is correct.
validate yaml-deep- provides a deep and detailed validation of module's YAML file, including provided variables and external links to DockerHub and icon.
validate github-repo- provides a validation of module's GitHub repository, i.e. it checks if required files like Dockerfile or entrypoint.sh exist.
validate github-organization- if you have a GitHub organization and each of your repository stores an implementation of a single module, then this command enables you to verify all your repositories.
validate local-directory- if you store your module's source code locally, then this command enables you to analyse its directory to verify whether it meets our basic requirements.
validate module-links- it validates all external links provided in module's YAML file: icon, repository, DockerHub, etc.
validate module-docker- it validates module's DockerHub repository and docker image information provided in module's YAML file.
Although the above mentioned commands are supposed to help module developers in their work, we strongly recommend running at least
validate yaml-deepvalidation before submitting any work to weeve. Here at weeve, we use these commands on a daily basis to verify all module that we produce for you.
The module validator repository provides a folder with examples of good YAML files and invalid erroneous YAMLs. We recommend reading repository's README.md file and running some commands on the example YAMLs in order to become familiar with the tool.