Skip to content

Commit

Permalink
🚧 [#4882] Documentation for ConfigurationSteps
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed Jan 21, 2025
1 parent 8e7074a commit 8dd7768
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"sphinx.ext.intersphinx",
"sphinx_tabs.tabs",
"sphinxcontrib.mermaid",
"django_setup_configuration.documentation.setup_config_example",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
36 changes: 30 additions & 6 deletions docs/installation/setup_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ After deploying Open Forms, it needs to be configured to be fully functional. Th
command line tool ``setup_configuration`` assist with this configuration by loading a
YAML file in which the configuration information is specified.

.. code-block:: bash
src/manage.py setup_configuration --yaml-file /path/to/your/yaml
You can get the full command documentation with:

.. code-block:: bash
Expand All @@ -26,16 +30,40 @@ requires specific configuration information, that should be prepared.
Here is the description of all available configuration steps and the shape of the data,
used by each step.

All of the configuration must be part of a single YAML file that is passed to the command.

OpenID Connect configuration for admin authentication
-----------------------------------------------------

.. autoclass:: mozilla_django_oidc_db.setup_configuration.steps.AdminOIDCConfigurationStep
:noindex:

.. setup-config-example:: mozilla_django_oidc_db.setup_configuration.steps.AdminOIDCConfigurationStep

Services configuration
----------------------

TODO: add generated documentation for ``zgw_consumers.ServiceConfigurationStep``
.. autoclass:: zgw_consumers.contrib.setup_configuration.steps.ServiceConfigurationStep
:noindex:

.. setup-config-example:: zgw_consumers.contrib.setup_configuration.steps.ServiceConfigurationStep


Objects API registration configuration
--------------------------------------

TODO: add generated documentation for ``ObjectsAPIConfigurationStep``
.. autoclass:: openforms.contrib.objects_api.setup_configuration.steps.ObjectsAPIConfigurationStep
:noindex:

.. setup-config-example:: openforms.contrib.objects_api.setup_configuration.steps.ObjectsAPIConfigurationStep

ZGW APIs registration configuration
-----------------------------------

.. autoclass:: openforms.registrations.contrib.zgw_apis.setup_configuration.steps.ZGWApiConfigurationStep
:noindex:

.. setup-config-example:: openforms.registrations.contrib.zgw_apis.setup_configuration.steps.ZGWApiConfigurationStep

Execution
=========
Expand All @@ -46,7 +74,3 @@ Open Forms configuration
With the full command invocation, all defined configuration steps are applied. Each step is idempotent,
so it's safe to run the command multiple times. The steps will overwrite any manual changes made in
the admin if you run the command after making these changes.

.. code-block:: bash
src/manage.py setup_configuration
11 changes: 7 additions & 4 deletions src/openforms/contrib/objects_api/setup_configuration/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,33 @@

class SingleObjectsAPIGroupConfigModel(ConfigurationModel):
objects_service_identifier: str = DjangoModelRef(
ObjectsAPIGroupConfig, "objects_service"
ObjectsAPIGroupConfig, "objects_service", examples=["objects-api"]
)
objecttypes_service_identifier: str = DjangoModelRef(
ObjectsAPIGroupConfig, "objecttypes_service"
ObjectsAPIGroupConfig, "objecttypes_service", examples=["objecttypes-api"]
)
documenten_service_identifier: str = DjangoModelRef(
ObjectsAPIGroupConfig, "drc_service", default=""
ObjectsAPIGroupConfig, "drc_service", default="", examples=["documenten-api"]
)
catalogi_service_identifier: str = DjangoModelRef(
ObjectsAPIGroupConfig, "catalogi_service", default=""
ObjectsAPIGroupConfig, "catalogi_service", default="", examples=["catalogi-api"]
)

# Renamed to be more descriptive
document_type_submission_report: str = DjangoModelRef(
ObjectsAPIGroupConfig,
"iot_submission_report",
examples=["PDF Informatieobjecttype"],
)
document_type_submission_csv: str = DjangoModelRef(
ObjectsAPIGroupConfig,
"iot_submission_csv",
examples=["CSV Informatieobjecttype"],
)
document_type_attachment: str = DjangoModelRef(
ObjectsAPIGroupConfig,
"iot_attachment",
examples=["Attachment Informatieobjecttype"],
)

class Meta:
Expand Down

0 comments on commit 8dd7768

Please sign in to comment.