Skip to content

Commit

Permalink
[#467] use zgw-consumers step to configure objecttypes connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonny Bakker committed Dec 12, 2024
1 parent 4f1767d commit 23f5756
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 248 deletions.
25 changes: 9 additions & 16 deletions docker/setup_configuration/data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@ sites_config:
- domain: example.com
name: Example site

objects_api_objecttypes_connection_config_enable: true
objects_api_objecttypes_connection:
identifier: objecttypes-api
label: Objecttypen API
api_root: https://objecttypes.nl/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: zgw
header_key: Authorization
header_value: Token foo
client_id: client
secret: secret
nlx: http://some-outway-adress.local:8080/
user_id: objects-api
user_representation: Objects API
timeout: 60
zgw_consumers_config_enable: true
zgw_consumers:
services:
- identifier: objecttypes-api
label: Objecttypes API
api_root: http://objecttypes.local/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: api_key
29 changes: 18 additions & 11 deletions docs/installation/config_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,28 @@ Create or update a (single) YAML configuration file with your settings:
Objecttypes connection configuration
-------------------------

Create or update a (single) YAML configuration file with your settings:
In order to be able to retrieve objecttypes, a corresponding ``Service`` should be
created. An example of a configuration could be seen below:

.. code-block:: yaml
objects_api_objecttypes_connection_config_enable: true
objects_api_objecttypes_connection:
identifier: objecttypen
label: ObjectTypen API
api_root: http://objecttypen.nl/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: api_key
header_key: Authorization
header_value: Token foo
...
zgw_consumers_config_enable: true
zgw_consumers:
services:
- identifier: objecttypes-api-1
label: Objecttypes API 1
api_root: http://objecttypes-1.local/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: api_key
- identifier: objecttypes-api-2
label: Objecttypes API 2
api_root: http://objecttypes-2.local/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: api_key
....
Execution
=========
Expand Down
2 changes: 1 addition & 1 deletion src/objects/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@
# Django setup configuration
#
SETUP_CONFIGURATION_STEPS = (
"zgw_consumers.contrib.setup_configuration.steps.ServiceConfigurationStep"
"objects.setup_configuration.steps.sites.SitesConfigurationStep",
"objects.setup_configuration.steps.objecttypes.ObjectTypesConnectionConfigurationStep",
)
16 changes: 0 additions & 16 deletions src/objects/core/tests/files/objecttypes_connection.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions src/objects/core/tests/files/objecttypes_connection_invalid.yaml

This file was deleted.

137 changes: 0 additions & 137 deletions src/objects/core/tests/test_objecttype_config.py

This file was deleted.

51 changes: 0 additions & 51 deletions src/objects/setup_configuration/steps/objecttypes.py

This file was deleted.

0 comments on commit 23f5756

Please sign in to comment.