Skip to content

Commit

Permalink
Restrict symbols in names (#43)
Browse files Browse the repository at this point in the history
* Restrict symbols in names

* Update source/description.rst

* Update source/description.rst

* Update source/description.rst

* Update source/description.rst

* Update source/description.rst

* Add restriction to link names
  • Loading branch information
rly authored Feb 5, 2025
1 parent 3e2c78c commit 6f541d8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions source/description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Text description of the namespace.
``name``
^^^^^^^^

Unique name used to refer to the namespace.
Unique name used to refer to the namespace. The name must not contain ":", "/", or whitespace.

``full_name``
^^^^^^^^^^^^^
Expand All @@ -160,7 +160,8 @@ Optional string with extended full name for the namespace.
``version``
^^^^^^^^^^^

Version string for the namespace
Version string for the namespace. The version string must not contain ":" or "/". It should follow
the NWB versioning guidelines: https://www.nwb.org/versioning-guidelines/

``date``
^^^^^^^^
Expand Down Expand Up @@ -270,6 +271,9 @@ Groups are specified as part of the top-level list or via lists stored in the ke
The key/value pairs that make up a group specification are described in more detail next in Section :numref:`sec-group-spec-keys`.
The keys should be ordered as specified above for readability and consistency with the rest of the schema.

The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must follow the
regular expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs.

.. note::

In version 3.0, the ``linkable`` key was removed.
Expand Down Expand Up @@ -539,7 +543,9 @@ Attribute specification keys
^^^^^^^^

String with the name for the attribute. The ``name`` key is required and must
specify a unique attribute on the current parent object (e.g., group or dataset)
specify a unique attribute on the current parent object (e.g., group or dataset).
The name must follow the regular expression pattern:
``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs.

.. _sec-dtype:

Expand Down Expand Up @@ -848,7 +854,8 @@ Link specification keys
``name``
^^^^^^^^

Optional key specifying the ``name`` of the link.
Optional key specifying the ``name`` of the link. The name must follow the
regular expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs.

``target_type``
^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -902,6 +909,9 @@ The key/value pairs that make up a dataset specification are described in more d
:numref:`sec-dataset-spec-keys`. The keys should be ordered as specified above for readability and consistency with the
rest of the schema.

The ``name``, ``default_name``, ``{{ data_type_def }}``, and ``{{ data_type_inc }}`` must follow the
regular expression pattern: ``^[A-Za-z_][A-Za-z0-9_]*$`` to ensure compatibility across APIs.

.. note::

In version 3.0, the ``default_value`` key was removed for datasets. The
Expand Down

0 comments on commit 6f541d8

Please sign in to comment.