From eb5cc1fc3efad5fe39354bc507a96a67709756d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Fri, 21 May 2021 15:09:42 +0200
Subject: [PATCH] added embedding configuration documentation in schema JSON

---
 CHANGELOG.md                            |  3 +++
 docs/configuration/schema.rst           | 16 ++++++++++++++++
 satella/__init__.py                     |  2 +-
 tests/test_configuration/test_schema.py |  5 ++++-
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 98670a27..9b084f01 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1 +1,4 @@
 # v2.16.4
+
+* added embedding configuration documentation in schema JSON
+    * this functionality does not require updating satella
diff --git a/docs/configuration/schema.rst b/docs/configuration/schema.rst
index 575a41eb..5fda5cfe 100644
--- a/docs/configuration/schema.rst
+++ b/docs/configuration/schema.rst
@@ -173,3 +173,19 @@ In which case cast_to will be displayed as a
 which will be eval()ed, and this value will be
 output. The input value will be called **x**.
 
+You can also provide a commentary for your entries:
+
+.. code-block:: json
+
+
+    {
+        "contents": {
+            "type": "file_contents",
+            "encoding": "utf-8,
+            "description": "Encryption key (private key)
+        },
+        "max_workers": {
+            "type": "int",
+            "description": "Maximum parallel instances of service"
+        }
+    }
diff --git a/satella/__init__.py b/satella/__init__.py
index 64fe3086..e8803eec 100644
--- a/satella/__init__.py
+++ b/satella/__init__.py
@@ -1 +1 @@
-__version__ = '2.16.4a1'
+__version__ = '2.16.4a2'
diff --git a/tests/test_configuration/test_schema.py b/tests/test_configuration/test_schema.py
index 2a8d2f50..adf466d8 100644
--- a/tests/test_configuration/test_schema.py
+++ b/tests/test_configuration/test_schema.py
@@ -93,7 +93,10 @@ class TestSchema(unittest.TestCase):
     def test_descriptor_from_schema(self):
         schema = {
             "key_s": "str",
-            "key_i": "int",
+            "key_i": {
+                "type": "int",
+                "description": "Value of key I"
+            },
             "key_f": "float",
             "ip_addr": "ipv4",
             "nested": {
-- 
GitLab