diff --git a/docs/more/development/document-templates/document-context.rst b/docs/more/development/document-templates/document-context.rst index 5847cc3..c2e028a 100644 --- a/docs/more/development/document-templates/document-context.rst +++ b/docs/more/development/document-templates/document-context.rst @@ -68,7 +68,7 @@ It is possible to easily turn the JSON-like / tree-structured document context i - All data types are using Python, e.g., ``str`` is textual string, ``Optional[str]`` is a string or ``None``, ``list[str]`` is a list of strings. - We use ``snake_case`` for naming of attributes and variables, ``PascalCase`` is used for class names. -- ``datetime`` is the standard `datetime `__ module. +- ``datetime`` is the standard `datetime `__ module, supports timezone information. Diagram ------- @@ -760,10 +760,8 @@ StringReply Aliases: -- ``as_number`` (``Optional[float]``) - tries to cast the value to a - number -- ``as_datetime`` (``Optional[datetime]``) - tries to cast the value to - a timestamp +- ``as_number`` (``Optional[float]``) - tries to cast the value to anumber +- ``as_datetime`` (``Optional[datetime]``) - tries to cast the value to a timestamp - ``markdown_html`` (``str``) - renders the value as Markdown and returns HTML - ``markdown_plain`` (``str``) - renders the value as Markdown and returns plain text (without formatting) diff --git a/docs/more/development/document-templates/specification.rst b/docs/more/development/document-templates/specification.rst index 25f40ee..d2356db 100644 --- a/docs/more/development/document-templates/specification.rst +++ b/docs/more/development/document-templates/specification.rst @@ -93,6 +93,11 @@ Document Template Metamodel Versions Here are described the changes in metamodel for template specification as well as :doc:`document context` so developers can easily update their templates to a newer metamodel version when needed. It is also possible to check JSON schemas in higher detail, see :doc:`../metamodel-schemas`. +Version 18.1 (since 4.31.0) +--------------------------- + +* Added support for Python ``datetime`` and ``zoneinfo`` in templates. + Version 18.0 (since 4.29.0) --------------------------- diff --git a/docs/more/development/metamodel-schemas.rst b/docs/more/development/metamodel-schemas.rst index ea7d0d8..a34ee86 100644 --- a/docs/more/development/metamodel-schemas.rst +++ b/docs/more/development/metamodel-schemas.rst @@ -63,6 +63,8 @@ Document Context is provided to the document templates by document worker. It co +-------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------+--------+ | Metamodel Version | Schema file | Changes (brief) | Since | +===================+==========================================================================================================================+=========================================================+========+ +| 18.1 | `JSON Schema `__ | Python datetime and zoneinfo support | 4.31.0 | ++-------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------+--------+ | 18.0 | `JSON Schema `__ | Renaming project and KM package, PluginIntegration | 4.29.0 | +-------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------+--------+ | 17.1 | `JSON Schema `__ | Configurable instance properties for Document Templates | 4.26.0 | @@ -110,6 +112,8 @@ Each template has its descriptor file ``template.json`` which contains all the i +-------------------+------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+--------+ | Metamodel Version | Schema file | Changes (brief) | Since | +===================+==============================================================================================================================+=============================================================+========+ +| 18.1 | `JSON Schema `__ | Python datetime and zoneinfo support | 4.31.0 | ++-------------------+------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+--------+ | 18.0 | `JSON Schema `__ | Renaming project and KM package, PluginIntegration | 4.29.0 | +-------------------+------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+--------+ | 17.1 | `JSON Schema `__ | Configurable instance properties for Document Templates | 4.26.0 |