.. Note: This page has to be in ReST format, not Markdown
.. because otherwise there are issues with linking between the schemas

File schemas
============

This page contains auto-generated :term:`JSON` schemas [#f1]_ for the text files used or generated by Nipoppy.

.. _config-schema:

Global configuration file
-------------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Below is the schema used for the global configuration :term:`JSON` file.

.. jsonschema:: config.json
    :lift_title: False

Pipeline configuration files
----------------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Here are the schemas for the ``config.json`` files in pipeline configuration directories.

.. _bidsification-pipeline-config-schema:

BIDSification pipelines
~~~~~~~~~~~~~~~~~~~~~~~

.. jsonschema:: bids_pipeline.json
    :lift_title: False

.. _processing-pipeline-config-schema:

Processing pipelines
~~~~~~~~~~~~~~~~~~~~

.. jsonschema:: proc_pipeline.json
    :lift_title: False

.. _extraction-pipeline-config-schema:

Extraction pipelines
~~~~~~~~~~~~~~~~~~~~

.. jsonschema:: extraction_pipeline.json
    :lift_title: False

Tracker configuration file
--------------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Here is the schema for a tracker configuration file:

.. jsonschema:: tracker.json
    :lift_title: False

HPC configuration file
----------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Here is the schema for an HPC (high-performance computing) configuration file:

.. jsonschema:: hpc.json
    :lift_title: False

.. _manifest-schema:

Manifest file
-------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Here is the schema for the {term}`manifest file`:

.. jsonschema:: manifest.json
    :lift_title: False

.. _curation-status-schema:

Curation status file
--------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Here is the schema for the {term}`curation status file`:

.. jsonschema:: curation_status.json
    :lift_title: False

.. _processing-status-schema:

Processing status file
----------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Here is the schema for the {term}`processing status file`:

.. jsonschema:: processing_status.json
    :lift_title: False

.. _dicom-dir-map-schema:

DICOM directory mapping file
----------------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Here is the schema for the DICOM directory mapping file:

.. jsonschema:: dicom_dir_map.json
    :lift_title: False

.. _layout-schema:

Layout configuration
--------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

.. admonition:: The default Nipoppy layout
    :class: dropdown

    The default Nipoppy layout uses the following configuration:

    .. literalinclude:: ../../../../nipoppy/data/layouts/layout-default.json
        :linenos:
        :language: json

Here is the schema used for :term:`JSON` files that define the layout of the dataset:

.. jsonschema:: layout.json
    :lift_title: False

Custom Nipoppy configurations in a Boutiques descriptor
-------------------------------------------------------

.. include:: schema_howto.md
    :parser: myst_parser.sphinx_

Nipoppy can read additional configurations from a Boutiques descriptor, under the
``custom\nipoppy`` key. The :term:`JSON` object is expected to comply with the following schema:

.. This has a link to the ContainerConfig schema pointing to the one that appears
.. under the Config schema, but there is another ContainerConfig schema under the
.. BoutiquesConfig schema
.. jsonschema:: boutiques.json
    :lift_title: False

.. Footer
.. [#f1] Created with `sphinx-jsonschema <https://github.com/lnoor/sphinx-jsonschema>`_
