Schemas validation description section was added to readme
Change-Id: Ie66800263ad9528ed18d5067dddfa5be9f15b9a7
Related-PROD: PROD-26805
diff --git a/README.rst b/README.rst
index 2e62556..4414544 100644
--- a/README.rst
+++ b/README.rst
@@ -980,6 +980,67 @@
...
{%- endfor %}
+Procedure of Data model and Schemas validation.
+-------------------
+Salt formula supports several mechanisms which allows to validate data model by jsonschema validator.
+It supports unversioned schemas which must be contained at:
+
+.. code-block:: text
+ 'salt://{}/schemas/{}.yaml'.format(service, role)
+
+and/or versioned schemas which must be contained at:
+
+.. code-block:: text
+ 'salt://{}/schemas/{}/{}.yaml'.format(service, version, role)
+
+Returns list of all defined schema files.
+
+.. code-block:: bash
+ salt-call modelschema.schema_list
+
+Returns pillar schema for given service and role.
+
+.. code-block:: bash
+
+ salt-call modelschema.schema_get ntp server
+ .. or ..
+ salt-call modelschema.schema_get keystone server pike
+
+Validates pillar schema itself of given service and role.
+
+.. code-block:: bash
+
+ salt-call modelschema.schema_validate ntp server
+ .. or ..
+ salt-call modelschema.schema_validate keystone server pike
+
+Validates pillar metadata by schema for given service and role.
+
+.. code-block:: bash
+
+ salt-call modelschema.model_validate ntp server
+ .. or ..
+ salt-call modelschema.model_validate keystone server pike
+
+Validates pillar metadata by schema for given service and role.
+
+.. code-block:: bash
+ salt-run modelschema.data_validate {'a': 'b'} {'a': 'b'}
+
+Generate pillar schema skeleton for given service. Method iterates throught
+test pillars and generates schema scaffold structure in JSON format that
+can be passed to service like http://jsonschema.net/ to get the basic
+schema for the individual roles of the service.
+
+.. code-block:: bash
+
+ salt-call modelschema.schema_from_tests ntp
+ .. or ..
+ salt-call modelschema.schema_from_tests keystone pike
+
+You can read more about it here:
+ http://json-schema.org/implementations.html
+ https://github.com/Julian/jsonschema
Usage
=====