Small feature release that updates setup-configuration
documentation
- Use generated yaml directive for setup-config docs
Bugfix release.
- 🐛 Make it possible to refresh credentials if a client is used over a long period of time.
Small feature release that provides an optional dependency via zgw-consumers[setup-configuration]
- Add a
django-setup-configuration
ConfigurationStep
that configures any number ofService
s from a YAML file.
Bugfix release.
- 🐛 The data migration introduced in 0.35.0 would initialize the
slug
field in such a way that the generated slug would typically exceed the field'smax_length
. This release fixes the field and the underlying migration.
💥 0.35.0 has been yanked and should not be used to avoid ending up in an inconsistent migration state. Use 0.35.1 instead.
Small feature release.
- ✨ Added a slug field to the
Service
model for improved indexing across instances. As this field is required, the included migration will initiaize this field with a slugified version of theapi_root
field. - ✨ Added natural key getters to the
Service
model to support Django's natural key-based (de)serialization methods.
💥 Breaking changes
- Because
slug
is now a required field, you may have to update your customService
creation or testing logic to ensure the field is properly set.
Feature and maintenance release
- 💥 Dropped support for Django 3.2 (end of life), only 4.2 and up are supported.
- You can now configure a health check endpoint for a service. The HTTP response status code of this URL is displayed in the admin change page.
Deprecation release. We've deprecated more public API, but made sure to provide/offer alternatives. This allows you to upgrade to newer versions of zgw-consumers already while buying yourself enough time to update your project code.
We published some of the deprecated utilities in a separate package: zgw-consumers-oas
.
Deprecated the OAS test utilities in
zgw_consumers.test
:read_schema
: Usezgw_consumers_oas.read_schema
if you need to.generate_oas_component
: Usezgw_consumers_oas.generate_oas_component
if you need to. However, we recommend using VCR instead of manually building API mocks, or leverage factory_boy to generate mock data.mock_service_oas_get
: there is no alternative because zgw-consumers no longer fetches configured API schemas.
Deprecated
zgw_consumers.drf.serializers.APIModelSerializer
. Instead, use djangorestframework-dataclasses.
The hard dependency on gemma-zds-client client is now optional.
This is another important step towards a 1.0 version. gemma-zds-client usage is still
supported through the legacy subpackage. Additionally, it was decided that the
zgw_consumers.api_models
package will still be part of 1.0, but it will be deprecated
and removed in 2.0.
💥 Breaking changes
The helpers in
zgw_consumers.service
(except forpagination_helper
) are removed. If you need these, you can safely copy the 0.31.0 service implementation.The zaaktype field mixin (
ListZaaktypenMixin
) for the admin is removed. If you need this, we recommend writing your own version based onape-pie
. You can of course use the 0.31.0 admin implementation for inspiration.Removed the manager method
Service.objects.get_client_for
. For the time being you can useService.get_client
instead, which is a drop-in replacement. Note however that this class method is deprecated and will be removed in 1.0. We recommend migrating toape-pie
:from requests import Session from zgw_consumers.client import build_client service = Service.get_service(some_resource_url) client: Session = build_client(service)
The gemma-zds-client is now an optional dependency. If you still make use of the
zgw_consumers.legacy
package, update your dependencies to include the new dependency group, e.g.zgw-consumers[zds-client]
.
🗑️ Deprecations
All code that is processing an OpenAPI specification in some form is deprecated. This includes:
zgw_consumers.cache
zgw_consumers.legacy
zgw_consumers.test.component_generation
zgw_consumers.test.schema_mock
Code built on top of gemma-zds-client is deprecated and will be removed in 1.0:
zgw_consumers.models.Service.build_client
zgw_consumers.models.Service.get_client
zgw_consumers.models.Service.get_auth_header
Cleanups
- gemma-zds-client is no longer a hard dependency. Users that don't use the
zgw_consumers.legacy
package can safely remove thegemma-zds-client
package. - The
Service
(andRestAPIService
abstract base) model requirement of either providingoas
(URL) oroas_file
is relaxed - opt-in via the new transitional settingZGW_CONSUMERS_IGNORE_OAS_FIELDS = True
. Note that this excludes these fields from the admin UI and bypasses the validation that a mutually exclusive value must be provided.
Periodic maintenance release
Breaking changes
- Dropped support for Django 4.1
Bugfixes and other cleanups
- Updated Github actions
- Set up PyPI trusted publisher
- Drop unused PyOpenSSL dependency from installation requirements
- Switched package management to
pyproject.toml
- Confirmed Python 3.12 support
Feature release
- Added a timeout field (default of 10s) to the service model. The timeout is passed to
the API client when using the
ape-pie
integration (zgw_consumers.client.ServiceConfigAdapter
andzgw_consumers.client.build_client
).
Backwards compatible 'feature' release.
- [#81] Replace get_paginated_results with pagination_helper
💥 Breaking changes release!
zgw_consumers
now recommends usingape-pie
as an HTTP client. The oldZGWClient
is still made available under thezgw_consumers.legacy
module. It is planned to be removed in the next major version.- Bump the minimum supported Python version to
3.10
. - Some dependencies that were installed by default are now moved to the
testutils
extra dependency group.
Bugfixes and other cleanups
- Added a
ServiceFactory
in thezgw_consumers.test.factories
module. - Fixed an issue that could lead to an infinite loop while parsing response from ZTC services.
- Fixed zaaktype field crashing if the Catalogi API spec uses non-standard operation ID's.
Backwards compatible 'feature' release.
Warning
The next release will have some breaking changes w/r to the API client implementations.
- [#67] Mention simple certmanager in installation instructions
- Formatted code with black
- test utilities: added minimal support for 'allOf' schema in generation of OAS properties
- test utilities: schema loading (YAML parsing) is now cached
Bugfix release
Removed the lru_cache
of zgw_consumers.admin_fields.get_zaaktypen
to prevent
stale data being returned on configuration changes or changes in remote API data.
Fixed a data migration crash after introducing the Service.uuid
field.
Feature/support release
- Catch HTTP 4xx and 5xx errors when using ZaaktypeField in the admin and display a meaningful message to the end user
- Added
Service.uuid
model field - Confirmed support for Django 4.2 and Python 3.11
Small compatibility release
- Hardened
get_paginated_results()
function to accept missing 'next'-link
Small maintenance release
- Replaced django-choices with models.TextChoices
- Confirmed support for Django 4.1
- Formatted code with latest black version
- Fixed bug in
get_paginated_results
function - Fixed bug in compatibility layer for zds-client v1/v2
Fixed missing prefix in default constraint name
Feature release
ServiceUrlField
now creates check constraints to guarantee data consistency
Feature release
- Added support for zds-client 2.0
Fixed the API models to be more compliant with the ZGW API standards.
(Most) fields that are not required in the API schema can now effectively be omitted from the response and still work with the API models.
- Fixed the usage of ServiceUrlField in nested queries.
💥 Breaking changes release!
TLS certificate management has been split off into the django-simple-certmanager library, which is now a dependency of this project. You should update the following references in your own code:
zgw_consumers.constants.CertificateTypes
->simple_certmanager.constants.CertificateTypes
zgw_consumers.models.Certificate
->simple_certmanager.models.Certificate
The Certificate
model is identical to the one shipped in zgw-consumers before
0.21.0. As a convenience, zgw_consumers.Certifcate
is still provided, which is a
proxy model to simple_certmanager.Certificate
.
Other changes
- Dropped support for Django 2.2. Only Django 3.2 and upwards are supported.
- The minimum version of gemma-zds-client has been bumped to the 1.0.x series
- Added database field ServiceUrlField
- Added management command to dump certificates to .zip archive
- Added docs (published on readthedocs.io)
- Updated package meta information
- Fixed admin crash when certificate label is empty
- Added Dutch translations
- Always display a label for certificates
- [#39] Hardened certificate admin changelist to not crash on missing physical files
- [#34] Test certificates are removed from filesystem when certificate records are deleted
- Expose type hints