Skip to content

Commit 7912bb6

Browse files
authored
Merge pull request #1324 from datanav/IS-18622
IS-18622: add docs for strip-ns
2 parents 9acd043 + 3763f91 commit 7912bb6

3 files changed

Lines changed: 32 additions & 3 deletions

File tree

hub/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
.. _changelog_2025-12-18:
5+
6+
2025-12-18
7+
----------
8+
* Added a new DTL function :ref:`strip-ns <strip_ns_dtl_function>`.
9+
410
.. _changelog_2025-12-01:
511

612
2025-12-01

hub/dtl/dtl-functions-dictionaries.rst

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Dictionaries
248248
| NAMESPACE_OR_CONFIGDICT(string|dict)
249249
| VALUES(value-expression{1})
250250
|
251-
| The apply-ns function can be used to add a namespace to the properties of a dict (recursively by default ), like the :ref:`add_namespaces <namespaces_feature_add_namespaces>` pipe feature does.
251+
| The apply-ns function can be used to add a namespace to the properties of a dict (recursively by default ), like the :ref:`add_namespaces <namespace_features>` pipe feature does.
252252
The NAMESPACE_OR_CONFIGDICT is either a static string value or a static dict value.
253253
The static dict value is technically a set of keyword arguments. The default value is
254254
| ``{``
@@ -258,7 +258,7 @@ Dictionaries
258258
| ``"skip_dollar": true,``
259259
| ``"recursive": true``
260260
| ``}``
261-
| and reflects the behaviour of the :ref:`add_namespaces=true <namespaces_feature_add_namespaces>` pipe property.
261+
| and reflects the behaviour of the :ref:`add_namespaces=true <namespace_features>` pipe property.
262262
|
263263
| By default properties starting with an ``"_"`` (underscore) character is left as-is, except for the ``_id`` property, where the property-value is prefixed with ``<identity_namespace>:``. The ``skip_underscore`` configdict setting can be set to ``false`` to treat properties starting with ``"_"`` as "normal" properties.
264264
|
@@ -279,6 +279,29 @@ Dictionaries
279279
| Returns ``{"myns:_id": "123", "myns:foo": 1, "myns:$bar": {"baz": 2}}``
280280
281281

282+
.. _strip_ns_dtl_function:
283+
284+
``strip-ns``
285+
------------
286+
287+
.. list-table::
288+
:header-rows: 1
289+
:widths: 40, 60
290+
291+
* - Description
292+
- Examples
293+
294+
* - | *Arguments:*
295+
| VALUES(value-expression{1})
296+
|
297+
| This function recursively removes namespaces from keys in a dict, like how the :ref:`remove_namespaces <namespace_features>` pipe feature removes namespaces from output entities.
298+
299+
- | Example:
300+
| ``["strip-ns", {"ns1:b": 1, "ns2:c": 2}]```
301+
| Returns ``{"b": 1, "c": 2}``
302+
|
303+
304+
282305
.. _path_dtl_function:
283306

284307
``path``

hub/features/namespaces.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You can enable namespaces in the service metadata for all the pipes in your subs
4646

4747
Properties
4848
^^^^^^^^^^
49-
.. _namespaces_feature_add_namespaces:
49+
.. _namespace_features:
5050

5151
.. list-table::
5252
:header-rows: 1

0 commit comments

Comments
 (0)