diff --git a/CHANGELOG.rst b/CHANGELOG.rst index efa798b..f911d8a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ Changes ======= +0.36.0 (2024-11-02) +------------------- + +Small feature release that provides an optional dependency via ``zgw-consumers[setup-configuration]`` + +* Add a ``django-setup-configuration`` ``ConfigurationStep`` that configures any number of ``Service``s from a YAML file + 0.35.1 (2024-08-15) ------------------- diff --git a/README.rst b/README.rst index aa668c1..a03cc8f 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ Welcome to ZGW Consumers' documentation! ======================================== -:Version: 0.35.1 +:Version: 0.36.0 :Source: https://github.com/maykinmedia/zgw-consumers :Keywords: OpenAPI, Zaakgericht Werken, Common Ground, NLX diff --git a/docs/index.rst b/docs/index.rst index 86bbd0c..65fc588 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -34,6 +34,7 @@ can still leverage the utilities offered by ZGW Consumers. models model_fields drf + setup_config testing reference changelog diff --git a/docs/setup_config.rst b/docs/setup_config.rst new file mode 100644 index 0000000..cbc2838 --- /dev/null +++ b/docs/setup_config.rst @@ -0,0 +1,54 @@ +Setup configuration +=================== + +Loading Services from a YAML file +********************************* + +This library provides a ``ConfigurationStep`` +(from the library ``django-setup-configuration``, see the +`documentation `_ +for more information on how to run ``setup_configuration``) +to configure any number of ``Services`` from a YAML file. + +To add this step to your configuration steps, add ``django_setup_configuration`` to ``INSTALLED_APPS`` and add the following setting: + + .. code:: python + + SETUP_CONFIGURATION_STEPS = [ + ... + "zgw_consumers.contrib.setup_configuration.steps.ServiceConfigurationStep" + ... + ] + +The YAML file that is passed to ``setup_configuration`` must set the +``zgw_consumers_config_enable`` flag to ``true`` to enable the step and also provide ``services`` under +the ``zgw_consumers`` namespace to configure ``Services`` + +Example file: + + .. code:: yaml + + zgw_consumers_config_enable: True + zgw_consumers: + services: + # all possible configurable fields + - identifier: objecten-test + label: Objecten API test + api_root: http://objecten.local/api/v1/ + api_connection_check_path: objects + api_type: orc + auth_type: api_key + header_key: Authorization + header_value: Token foo + client_id: client + secret: super-secret + nlx: http://some-outway-adress.local:8080/ + user_id: open-formulieren + user_representation: Open Formulieren + timeout: 5 + # minimum required fields + - identifier: objecttypen-test + label: Objecttypen API test + api_root: http://objecttypen.local/api/v1/ + api_type: orc + auth_type: api_key diff --git a/pyproject.toml b/pyproject.toml index f968784..ce26b0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "zgw-consumers" -version = "0.35.1" +version = "0.36.0" description = "Configuration for service (OpenAPI 3 or other) consumers" authors = [ {name = "Maykin Media", email = "support@maykinmedia.nl"} @@ -107,7 +107,7 @@ markers = [ ] [tool.bumpversion] -current_version = "0.35.1" +current_version = "0.36.0" files = [ {filename = "pyproject.toml"}, {filename = "README.rst"}, diff --git a/zgw_consumers/locale/nl/LC_MESSAGES/django.po b/zgw_consumers/locale/nl/LC_MESSAGES/django.po index e4997fe..88ad72f 100644 --- a/zgw_consumers/locale/nl/LC_MESSAGES/django.po +++ b/zgw_consumers/locale/nl/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 0.34.0\n" +"Project-Id-Version: 0.36.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-08-13 18:00+0200\n" "PO-Revision-Date: 2022-05-17 09:40+02:00\n"