Schemas validation procedure was updated.
* This change provides processing versioned schemas and test pillars.
* readme was updated.
Change-Id: I609d1f83b2073929b6e169759fb4c9e315cc9942
Related-PROD: PROD-26201
diff --git a/README.rst b/README.rst
index 4942758..b85124c 100644
--- a/README.rst
+++ b/README.rst
@@ -14,6 +14,72 @@
cookiecutter salt-formula
+Procedure of Data model and Schemas validation.
+===============================
+
+run_tests.sh script is able to validate data model by schemas and test pillars.
+It supports versioned and unversioned schemas and pillars. Schemas and pillars must contains yaml format.
+
+Unversioned items must be avaible in:
+
+.. code-block:: text
+
+ {FORMULA_NAME}/{FORMULA_NAME}/schemas/
+ {FORMULA_NAME}/tests/pillar/
+
+Versioned items must be avaible in:
+
+.. code-block:: text
+
+ {FORMULA_NAME}/{FORMULA_NAME}/schemas/{version}/
+ {FORMULA_NAME}/tests/pillar/{version}/
+
+You can run run_tests.sh by following command:
+
+.. code-block:: shell
+
+ # cd <formula repository>
+ ./tests/run_tests.sh
+
+You can run run_tests.sh which inlude schema validation if schemas present by following command:
+
+.. code-block:: shell
+
+ # cd <formula repository>
+ ./tests/run_tests.sh model-validate
+
+Example schemas:
+
+.. code-block:: yaml
+
+ %YAML 1.1
+ ---
+ "$schema": "http://json-schema.org/draft-06/schema#"
+ title: {{cookiecutter.service_name}} daemon role
+ description: |
+ {{cookiecutter.service_name|capitalize}} daemon, server role
+ type: object
+ additionalProperties: false
+
+ required:
+ - enabled
+
+ properties:
+ enabled:
+ description: |
+ Enables {{cookiecutter.service_name}} daemon service
+ type: boolean
+
+Example pillar:
+
+.. code-block:: yaml
+ {{cookiecutter.service_name}}:
+ {{cookiecutter.role_name}}:
+ enabled: true
+
+You can read more about it here:
+ http://json-schema.org/implementations.html
+ http://github.com/Julian/jsonschema
Init Test Kitchen configuration
===============================