commonground-api-common 1.13.3__tar.gz → 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- commonground_api_common-2.0.0/CHANGELOG.rst +58 -0
- {commonground_api_common-1.13.3/commonground_api_common.egg-info → commonground_api_common-2.0.0}/PKG-INFO +10 -11
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/README.rst +0 -3
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0/commonground_api_common.egg-info}/PKG-INFO +10 -11
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/commonground_api_common.egg-info/SOURCES.txt +7 -4
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/commonground_api_common.egg-info/requires.txt +9 -6
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/setup.cfg +12 -9
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_jwt_decoding.py +1 -1
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_jwtsecrets.py +3 -5
- commonground_api_common-2.0.0/tests/test_migrations.py +234 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_permissions.py +1 -1
- commonground_api_common-2.0.0/tests/test_views.py +205 -0
- commonground_api_common-2.0.0/vng_api_common/__init__.py +1 -0
- commonground_api_common-2.0.0/vng_api_common/admin.py +10 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/admin.py +1 -1
- {commonground_api_common-1.13.3/vng_api_common → commonground_api_common-2.0.0/vng_api_common/authorizations}/middleware.py +23 -40
- commonground_api_common-2.0.0/vng_api_common/authorizations/migrations/0016_remove_authorizationsconfig_api_root_and_more.py +76 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/models.py +38 -3
- commonground_api_common-2.0.0/vng_api_common/authorizations/utils.py +17 -0
- commonground_api_common-2.0.0/vng_api_common/client.py +73 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/conf/api.py +0 -3
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/management/commands/generate_swagger.py +1 -1
- commonground_api_common-2.0.0/vng_api_common/middleware.py +35 -0
- commonground_api_common-2.0.0/vng_api_common/migrations/0006_delete_apicredential.py +119 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/mocks.py +4 -1
- commonground_api_common-2.0.0/vng_api_common/models.py +63 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/api/views.py +1 -1
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/handlers.py +8 -3
- commonground_api_common-2.0.0/vng_api_common/notifications/migrations/0011_remove_subscription_config_and_more.py +23 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/oas.py +0 -3
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/routers.py +3 -3
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/tests/schema.py +12 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/utils.py +0 -22
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/validators.py +0 -38
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/views.py +26 -22
- commonground_api_common-1.13.3/CHANGELOG.rst +0 -30
- commonground_api_common-1.13.3/tests/test_config.py +0 -13
- commonground_api_common-1.13.3/tests/test_views.py +0 -18
- commonground_api_common-1.13.3/vng_api_common/__init__.py +0 -1
- commonground_api_common-1.13.3/vng_api_common/admin.py +0 -29
- commonground_api_common-1.13.3/vng_api_common/client.py +0 -44
- commonground_api_common-1.13.3/vng_api_common/models.py +0 -174
- commonground_api_common-1.13.3/vng_api_common/notifications/constants.py +0 -3
- commonground_api_common-1.13.3/vng_api_common/notifications/models.py +0 -97
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/MANIFEST.in +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/bin/generate_schema +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/bin/patch_content_types +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/bin/use_external_components +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/commonground_api_common.egg-info/dependency_links.txt +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/commonground_api_common.egg-info/not-zip-safe +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/commonground_api_common.egg-info/top_level.txt +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/pyproject.toml +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/setup.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_autorisatie_validation.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_cache_headers.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_check_query_params.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_checks.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_choices.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_content_type_headers.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_filters.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_gegevensgroepen.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_get_resource.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_nested_serializer_validation.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_pagination.py +0 -0
- /commonground_api_common-1.13.3/tests/test_publish_validator.py → /commonground_api_common-2.0.0/tests/test_publish_validators.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_schema_root_tags.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_server_errors.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_utils.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/tests/test_validators.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/api/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/api/permissions.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/api/serializers.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/api/urls.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/api/views.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/apps.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/admin.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/api/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/api/scopes.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/api/serializers.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/apps.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/audits.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0001_initial.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0002_auto_20190516_0830.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0003_auto_20190517_0844.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0004_auto_20190520_1238.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0005_auto_20190520_1450.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0006_audittrail_toelichting.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0007_auto_20190522_0916.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0008_audittrail_resource_weergave.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0009_auto_20190712_1643.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0010_audittrail_request_id.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0011_auto_20190918_1335.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0012_auto_20200619_0545.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0012_remove_audittrail_request_id.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0013_audittrail_logrecord_id.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0013_auto_20201207_0846.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0014_auto_20201221_0905.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0014_auto_20210323_1654.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0015_auto_20220318_1608.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0016_merge_20220607_0517.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0017_alter_audittrail_bron.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/0018_auto_20221212_0745.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/migrations/_operations.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/models.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/audittrails/viewsets.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0001_initial.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0002_authorizationsconfig.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0003_auto_20190502_0409.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0004_auto_20190503_0941.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0005_auto_20190506_0842.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0006_auto_20190506_0901.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0007_auto_20190506_1212.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0008_auto_20190712_1541.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0009_update_enums.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0010_auto_20190712_1643.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0011_auto_20191114_0728.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0012_auto_20200619_0545.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0013_auto_20201207_0846.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0014_auto_20201221_0905.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/0015_auto_20220318_1608.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/migrations/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/serializers.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/authorizations/validators.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/caching/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/caching/decorators.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/caching/etags.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/caching/introspection.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/caching/models.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/caching/registry.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/caching/signals.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/checks.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/choices.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/compat.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/conf/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/constants.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/db/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/db/operations.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/decorators.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/descriptors.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/doc.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/exception_handling.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/exceptions.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/fields.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/filters.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/filtersets.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/generators.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/geo.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/cache.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/fields.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/files.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/geojson.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/polymorphic.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/query.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/utils.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/inspectors/view.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/locale/nl/LC_MESSAGES/django.mo +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/locale/nl/LC_MESSAGES/django.po +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/management/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/management/commands/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/management/commands/generate_autorisaties.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/management/commands/generate_notificaties.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/management/commands/patch_error_contenttypes.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/management/commands/use_external_components.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/migrations/0001_initial.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/migrations/0002_apicredential.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/migrations/0003_auto_20190417_1145.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/migrations/0004_auto_20190517_0903.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/migrations/0005_auto_20190614_1346.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/migrations/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/api/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/api/urls.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/apps.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0001_initial.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0002_subscription__subscription.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0003_auto_20190319_1048.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0004_auto_20190325_1313.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0005_fix_default_nrc.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0006_auto_20190417_1142.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0007_auto_20190429_1442.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0008_auto_20190502_0415.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0009_auto_20190729_0427.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/0010_auto_20220704_1419.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/notifications/migrations/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/pagination.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/permissions.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/polymorphism.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/schema.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/scopes.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/search.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/serializers.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/css/admin/admin_overrides.css +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/css/screen.css +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/ico/favicon.png +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/img/vng.svg +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/LICENSE.txt +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.css +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.min.css +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.eot +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.svg +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.eot +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.svg +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.eot +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.svg +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/admin/base_site.html +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/api_schema_to_markdown_table.md +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/autorisaties.md +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/includes/kanalen_card.html +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/index.html +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/master.html +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/notificaties.md +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/ref/error_detail.html +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/ref/scopes.html +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templates/vng_api_common/view_config.html +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templatetags/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/templatetags/vng_api_common.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/tests/__init__.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/tests/auth.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/tests/caching.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/tests/urls.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/urls.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/version.py +0 -0
- {commonground_api_common-1.13.3 → commonground_api_common-2.0.0}/vng_api_common/viewsets.py +0 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
==============
|
2
|
+
Change history
|
3
|
+
==============
|
4
|
+
|
5
|
+
2.0.0 (2024-11-22)
|
6
|
+
------------------
|
7
|
+
|
8
|
+
* upgrade to zgw-consumers 0.35.1
|
9
|
+
* remove zds-client dependency and replace with ``ape_pie.APIClient``
|
10
|
+
* upgrade to notifications-api-common>=0.3.0
|
11
|
+
* replace ``get_auth_headers`` with ``generate_jwt`` util
|
12
|
+
|
13
|
+
.. warning::
|
14
|
+
|
15
|
+
If your project uses OAS test utilities, make sure to install them via ``commonground-api-common[tests]``
|
16
|
+
|
17
|
+
.. warning::
|
18
|
+
|
19
|
+
The ``APICredential`` class has been removed in favor of the ``Service`` model from zgw-consumers,
|
20
|
+
a data migration is added to create ``Service`` instances from ``APICredential`` instances
|
21
|
+
|
22
|
+
.. warning::
|
23
|
+
|
24
|
+
Several notifications related models (``NotificationsConfig`` and ``Subscription``) as well as
|
25
|
+
the constants ``SCOPE_NOTIFICATIES_CONSUMEREN_LABEL`` and ``SCOPE_NOTIFICATIES_PUBLICEREN_LABEL`` have
|
26
|
+
been removed, since they are defined in ``notifications-api-common`` and were a not deleted yet in ``commonground-api-common``
|
27
|
+
|
28
|
+
1.13.4 (2024-10-25)
|
29
|
+
-------------------
|
30
|
+
|
31
|
+
* Move AuthMiddleware to authorizations app, to avoid unnecessary migrations for projects that don't use ``vng_api_common.authorizations``
|
32
|
+
|
33
|
+
1.13.3 (2024-09-05)
|
34
|
+
-------------------
|
35
|
+
|
36
|
+
* Dropped support for Python 3.8 and Python 3.9
|
37
|
+
* [#33] Added dynamic pagination
|
38
|
+
|
39
|
+
|
40
|
+
1.13.2 (2024-07-05)
|
41
|
+
-------------------
|
42
|
+
|
43
|
+
* Added *identificatie* to ``UniekeIdentificatieValidator`` error message
|
44
|
+
|
45
|
+
|
46
|
+
1.13.1 (2024-05-28)
|
47
|
+
-------------------
|
48
|
+
|
49
|
+
* Marked notifications view scopes as private
|
50
|
+
* Added natural keys to authorization models
|
51
|
+
|
52
|
+
|
53
|
+
1.13.0 (2024-03-01)
|
54
|
+
-------------------
|
55
|
+
|
56
|
+
* Added support of Django 4.2
|
57
|
+
* Removed support of Python 3.7
|
58
|
+
* Added support of Python 3.11
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: commonground-api-common
|
3
|
-
Version:
|
3
|
+
Version: 2.0.0
|
4
4
|
Summary: Commonground API tooling
|
5
5
|
Home-page: https://github.com/maykinmedia/commonground-api-common
|
6
6
|
Author: Maykin Media, VNG-Realisatie
|
@@ -9,7 +9,6 @@ License: EUPL 1.2
|
|
9
9
|
Keywords: openapi,swagger,django
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
11
11
|
Classifier: Framework :: Django
|
12
|
-
Classifier: Framework :: Django :: 3.2
|
13
12
|
Classifier: Framework :: Django :: 4.2
|
14
13
|
Classifier: Intended Audience :: Developers
|
15
14
|
Classifier: Operating System :: Unix
|
@@ -20,22 +19,24 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
22
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
23
|
-
Requires-Dist: django>=
|
24
|
-
Requires-Dist: django-filter
|
22
|
+
Requires-Dist: django>=4.2.0
|
23
|
+
Requires-Dist: django-filter<=25.1,>=23.1
|
25
24
|
Requires-Dist: django-solo
|
26
|
-
Requires-Dist: djangorestframework>=3.
|
25
|
+
Requires-Dist: djangorestframework>=3.15.0
|
27
26
|
Requires-Dist: djangorestframework_camel_case>=1.2.0
|
28
27
|
Requires-Dist: django-rest-framework-condition
|
29
28
|
Requires-Dist: drf-yasg>=1.20.0
|
30
|
-
Requires-Dist: drf-nested-routers>=0.
|
31
|
-
Requires-Dist: gemma-zds-client>=0.14.0
|
29
|
+
Requires-Dist: drf-nested-routers>=0.94.1
|
32
30
|
Requires-Dist: iso-639
|
33
31
|
Requires-Dist: isodate
|
34
|
-
Requires-Dist: notifications-api-common>=0.
|
32
|
+
Requires-Dist: notifications-api-common>=0.3.0
|
33
|
+
Requires-Dist: zgw-consumers>=0.35.1
|
35
34
|
Requires-Dist: oyaml
|
36
35
|
Requires-Dist: PyJWT>=2.0.0
|
37
36
|
Requires-Dist: requests
|
37
|
+
Requires-Dist: requests-mock
|
38
38
|
Requires-Dist: coreapi
|
39
|
+
Requires-Dist: ape-pie
|
39
40
|
Provides-Extra: markdown-docs
|
40
41
|
Requires-Dist: django-markup<=1.3; extra == "markdown-docs"
|
41
42
|
Requires-Dist: markdown; extra == "markdown-docs"
|
@@ -49,6 +50,7 @@ Requires-Dist: isort; extra == "tests"
|
|
49
50
|
Requires-Dist: black; extra == "tests"
|
50
51
|
Requires-Dist: requests-mock; extra == "tests"
|
51
52
|
Requires-Dist: freezegun; extra == "tests"
|
53
|
+
Requires-Dist: zgw-consumers-oas; extra == "tests"
|
52
54
|
Provides-Extra: pep8
|
53
55
|
Requires-Dist: flake8; extra == "pep8"
|
54
56
|
Provides-Extra: coverage
|
@@ -97,9 +99,6 @@ Features
|
|
97
99
|
* ``UniekeIdentificatieValidator`` (in combinatie met organisatie)
|
98
100
|
* ``InformatieObjectUniqueValidator`` om te valideren dat M2M entries
|
99
101
|
slechts eenmalig voorkomen
|
100
|
-
* ``ObjectInformatieObjectValidator`` om te valideren dat de synchronisatie
|
101
|
-
van een object-informatieobject relatie pas kan nadat deze relatie in het
|
102
|
-
DRC gemaakt is
|
103
102
|
* ``IsImmutableValidator`` - valideer dat bepaalde velden niet gewijzigd
|
104
103
|
worden bij een (partial) update, maar wel mogen gezet worden bij een create
|
105
104
|
* ``ResourceValidator`` - valideer dat een URL een bepaalde resource ontsluit
|
@@ -35,9 +35,6 @@ Features
|
|
35
35
|
* ``UniekeIdentificatieValidator`` (in combinatie met organisatie)
|
36
36
|
* ``InformatieObjectUniqueValidator`` om te valideren dat M2M entries
|
37
37
|
slechts eenmalig voorkomen
|
38
|
-
* ``ObjectInformatieObjectValidator`` om te valideren dat de synchronisatie
|
39
|
-
van een object-informatieobject relatie pas kan nadat deze relatie in het
|
40
|
-
DRC gemaakt is
|
41
38
|
* ``IsImmutableValidator`` - valideer dat bepaalde velden niet gewijzigd
|
42
39
|
worden bij een (partial) update, maar wel mogen gezet worden bij een create
|
43
40
|
* ``ResourceValidator`` - valideer dat een URL een bepaalde resource ontsluit
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: commonground-api-common
|
3
|
-
Version:
|
3
|
+
Version: 2.0.0
|
4
4
|
Summary: Commonground API tooling
|
5
5
|
Home-page: https://github.com/maykinmedia/commonground-api-common
|
6
6
|
Author: Maykin Media, VNG-Realisatie
|
@@ -9,7 +9,6 @@ License: EUPL 1.2
|
|
9
9
|
Keywords: openapi,swagger,django
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
11
11
|
Classifier: Framework :: Django
|
12
|
-
Classifier: Framework :: Django :: 3.2
|
13
12
|
Classifier: Framework :: Django :: 4.2
|
14
13
|
Classifier: Intended Audience :: Developers
|
15
14
|
Classifier: Operating System :: Unix
|
@@ -20,22 +19,24 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
22
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
23
|
-
Requires-Dist: django>=
|
24
|
-
Requires-Dist: django-filter
|
22
|
+
Requires-Dist: django>=4.2.0
|
23
|
+
Requires-Dist: django-filter<=25.1,>=23.1
|
25
24
|
Requires-Dist: django-solo
|
26
|
-
Requires-Dist: djangorestframework>=3.
|
25
|
+
Requires-Dist: djangorestframework>=3.15.0
|
27
26
|
Requires-Dist: djangorestframework_camel_case>=1.2.0
|
28
27
|
Requires-Dist: django-rest-framework-condition
|
29
28
|
Requires-Dist: drf-yasg>=1.20.0
|
30
|
-
Requires-Dist: drf-nested-routers>=0.
|
31
|
-
Requires-Dist: gemma-zds-client>=0.14.0
|
29
|
+
Requires-Dist: drf-nested-routers>=0.94.1
|
32
30
|
Requires-Dist: iso-639
|
33
31
|
Requires-Dist: isodate
|
34
|
-
Requires-Dist: notifications-api-common>=0.
|
32
|
+
Requires-Dist: notifications-api-common>=0.3.0
|
33
|
+
Requires-Dist: zgw-consumers>=0.35.1
|
35
34
|
Requires-Dist: oyaml
|
36
35
|
Requires-Dist: PyJWT>=2.0.0
|
37
36
|
Requires-Dist: requests
|
37
|
+
Requires-Dist: requests-mock
|
38
38
|
Requires-Dist: coreapi
|
39
|
+
Requires-Dist: ape-pie
|
39
40
|
Provides-Extra: markdown-docs
|
40
41
|
Requires-Dist: django-markup<=1.3; extra == "markdown-docs"
|
41
42
|
Requires-Dist: markdown; extra == "markdown-docs"
|
@@ -49,6 +50,7 @@ Requires-Dist: isort; extra == "tests"
|
|
49
50
|
Requires-Dist: black; extra == "tests"
|
50
51
|
Requires-Dist: requests-mock; extra == "tests"
|
51
52
|
Requires-Dist: freezegun; extra == "tests"
|
53
|
+
Requires-Dist: zgw-consumers-oas; extra == "tests"
|
52
54
|
Provides-Extra: pep8
|
53
55
|
Requires-Dist: flake8; extra == "pep8"
|
54
56
|
Provides-Extra: coverage
|
@@ -97,9 +99,6 @@ Features
|
|
97
99
|
* ``UniekeIdentificatieValidator`` (in combinatie met organisatie)
|
98
100
|
* ``InformatieObjectUniqueValidator`` om te valideren dat M2M entries
|
99
101
|
slechts eenmalig voorkomen
|
100
|
-
* ``ObjectInformatieObjectValidator`` om te valideren dat de synchronisatie
|
101
|
-
van een object-informatieobject relatie pas kan nadat deze relatie in het
|
102
|
-
DRC gemaakt is
|
103
102
|
* ``IsImmutableValidator`` - valideer dat bepaalde velden niet gewijzigd
|
104
103
|
worden bij een (partial) update, maar wel mogen gezet worden bij een create
|
105
104
|
* ``ResourceValidator`` - valideer dat een URL een bepaalde resource ontsluit
|
@@ -18,17 +18,17 @@ tests/test_cache_headers.py
|
|
18
18
|
tests/test_check_query_params.py
|
19
19
|
tests/test_checks.py
|
20
20
|
tests/test_choices.py
|
21
|
-
tests/test_config.py
|
22
21
|
tests/test_content_type_headers.py
|
23
22
|
tests/test_filters.py
|
24
23
|
tests/test_gegevensgroepen.py
|
25
24
|
tests/test_get_resource.py
|
26
25
|
tests/test_jwt_decoding.py
|
27
26
|
tests/test_jwtsecrets.py
|
27
|
+
tests/test_migrations.py
|
28
28
|
tests/test_nested_serializer_validation.py
|
29
29
|
tests/test_pagination.py
|
30
30
|
tests/test_permissions.py
|
31
|
-
tests/
|
31
|
+
tests/test_publish_validators.py
|
32
32
|
tests/test_schema_root_tags.py
|
33
33
|
tests/test_server_errors.py
|
34
34
|
tests/test_utils.py
|
@@ -109,8 +109,10 @@ vng_api_common/audittrails/migrations/__init__.py
|
|
109
109
|
vng_api_common/audittrails/migrations/_operations.py
|
110
110
|
vng_api_common/authorizations/__init__.py
|
111
111
|
vng_api_common/authorizations/admin.py
|
112
|
+
vng_api_common/authorizations/middleware.py
|
112
113
|
vng_api_common/authorizations/models.py
|
113
114
|
vng_api_common/authorizations/serializers.py
|
115
|
+
vng_api_common/authorizations/utils.py
|
114
116
|
vng_api_common/authorizations/validators.py
|
115
117
|
vng_api_common/authorizations/migrations/0001_initial.py
|
116
118
|
vng_api_common/authorizations/migrations/0002_authorizationsconfig.py
|
@@ -127,6 +129,7 @@ vng_api_common/authorizations/migrations/0012_auto_20200619_0545.py
|
|
127
129
|
vng_api_common/authorizations/migrations/0013_auto_20201207_0846.py
|
128
130
|
vng_api_common/authorizations/migrations/0014_auto_20201221_0905.py
|
129
131
|
vng_api_common/authorizations/migrations/0015_auto_20220318_1608.py
|
132
|
+
vng_api_common/authorizations/migrations/0016_remove_authorizationsconfig_api_root_and_more.py
|
130
133
|
vng_api_common/authorizations/migrations/__init__.py
|
131
134
|
vng_api_common/caching/__init__.py
|
132
135
|
vng_api_common/caching/decorators.py
|
@@ -162,12 +165,11 @@ vng_api_common/migrations/0002_apicredential.py
|
|
162
165
|
vng_api_common/migrations/0003_auto_20190417_1145.py
|
163
166
|
vng_api_common/migrations/0004_auto_20190517_0903.py
|
164
167
|
vng_api_common/migrations/0005_auto_20190614_1346.py
|
168
|
+
vng_api_common/migrations/0006_delete_apicredential.py
|
165
169
|
vng_api_common/migrations/__init__.py
|
166
170
|
vng_api_common/notifications/__init__.py
|
167
171
|
vng_api_common/notifications/apps.py
|
168
|
-
vng_api_common/notifications/constants.py
|
169
172
|
vng_api_common/notifications/handlers.py
|
170
|
-
vng_api_common/notifications/models.py
|
171
173
|
vng_api_common/notifications/api/__init__.py
|
172
174
|
vng_api_common/notifications/api/urls.py
|
173
175
|
vng_api_common/notifications/api/views.py
|
@@ -181,6 +183,7 @@ vng_api_common/notifications/migrations/0007_auto_20190429_1442.py
|
|
181
183
|
vng_api_common/notifications/migrations/0008_auto_20190502_0415.py
|
182
184
|
vng_api_common/notifications/migrations/0009_auto_20190729_0427.py
|
183
185
|
vng_api_common/notifications/migrations/0010_auto_20220704_1419.py
|
186
|
+
vng_api_common/notifications/migrations/0011_remove_subscription_config_and_more.py
|
184
187
|
vng_api_common/notifications/migrations/__init__.py
|
185
188
|
vng_api_common/static/vng_api_common/css/screen.css
|
186
189
|
vng_api_common/static/vng_api_common/css/admin/admin_overrides.css
|
@@ -1,19 +1,21 @@
|
|
1
|
-
django>=
|
2
|
-
django-filter
|
1
|
+
django>=4.2.0
|
2
|
+
django-filter<=25.1,>=23.1
|
3
3
|
django-solo
|
4
|
-
djangorestframework>=3.
|
4
|
+
djangorestframework>=3.15.0
|
5
5
|
djangorestframework_camel_case>=1.2.0
|
6
6
|
django-rest-framework-condition
|
7
7
|
drf-yasg>=1.20.0
|
8
|
-
drf-nested-routers>=0.
|
9
|
-
gemma-zds-client>=0.14.0
|
8
|
+
drf-nested-routers>=0.94.1
|
10
9
|
iso-639
|
11
10
|
isodate
|
12
|
-
notifications-api-common>=0.
|
11
|
+
notifications-api-common>=0.3.0
|
12
|
+
zgw-consumers>=0.35.1
|
13
13
|
oyaml
|
14
14
|
PyJWT>=2.0.0
|
15
15
|
requests
|
16
|
+
requests-mock
|
16
17
|
coreapi
|
18
|
+
ape-pie
|
17
19
|
|
18
20
|
[coverage]
|
19
21
|
pytest-cov
|
@@ -43,3 +45,4 @@ isort
|
|
43
45
|
black
|
44
46
|
requests-mock
|
45
47
|
freezegun
|
48
|
+
zgw-consumers-oas
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[metadata]
|
2
2
|
name = commonground-api-common
|
3
|
-
version =
|
3
|
+
version = 2.0.0
|
4
4
|
description = Commonground API tooling
|
5
5
|
long_description = file: README.rst
|
6
6
|
url = https://github.com/maykinmedia/commonground-api-common
|
@@ -11,7 +11,6 @@ keywords = openapi, swagger, django
|
|
11
11
|
classifiers =
|
12
12
|
Development Status :: 5 - Production/Stable
|
13
13
|
Framework :: Django
|
14
|
-
Framework :: Django :: 3.2
|
15
14
|
Framework :: Django :: 4.2
|
16
15
|
Intended Audience :: Developers
|
17
16
|
Operating System :: Unix
|
@@ -32,22 +31,24 @@ scripts =
|
|
32
31
|
bin/patch_content_types
|
33
32
|
bin/use_external_components
|
34
33
|
install_requires =
|
35
|
-
django>=
|
36
|
-
django-filter>=
|
34
|
+
django>=4.2.0
|
35
|
+
django-filter>=23.1,<=25.1
|
37
36
|
django-solo
|
38
|
-
djangorestframework>=3.
|
37
|
+
djangorestframework>=3.15.0
|
39
38
|
djangorestframework_camel_case>=1.2.0
|
40
39
|
django-rest-framework-condition
|
41
|
-
drf-yasg>=1.20.0
|
42
|
-
drf-nested-routers>=0.
|
43
|
-
gemma-zds-client>=0.14.0
|
40
|
+
drf-yasg>=1.20.0 # TODO: remove usage?
|
41
|
+
drf-nested-routers>=0.94.1
|
44
42
|
iso-639
|
45
43
|
isodate
|
46
|
-
notifications-api-common>=0.
|
44
|
+
notifications-api-common>=0.3.0
|
45
|
+
zgw-consumers>=0.35.1
|
47
46
|
oyaml
|
48
47
|
PyJWT>=2.0.0
|
49
48
|
requests
|
49
|
+
requests-mock
|
50
50
|
coreapi
|
51
|
+
ape-pie
|
51
52
|
tests_require =
|
52
53
|
pytest
|
53
54
|
pytest-django
|
@@ -57,6 +58,7 @@ tests_require =
|
|
57
58
|
black
|
58
59
|
requests-mock
|
59
60
|
freezegun
|
61
|
+
zgw-consumers-oas
|
60
62
|
|
61
63
|
[options.packages.find]
|
62
64
|
include =
|
@@ -76,6 +78,7 @@ tests =
|
|
76
78
|
black
|
77
79
|
requests-mock
|
78
80
|
freezegun
|
81
|
+
zgw-consumers-oas
|
79
82
|
pep8 = flake8
|
80
83
|
coverage = pytest-cov
|
81
84
|
docs =
|
@@ -2,9 +2,9 @@ import pytest
|
|
2
2
|
from rest_framework import status
|
3
3
|
from rest_framework.reverse import reverse
|
4
4
|
from rest_framework.test import APIClient
|
5
|
-
from zds_client.auth import ClientAuth
|
6
5
|
|
7
6
|
from vng_api_common.authorizations.models import Applicatie, Autorisatie
|
7
|
+
from vng_api_common.authorizations.utils import generate_jwt
|
8
8
|
from vng_api_common.constants import ComponentTypes
|
9
9
|
from vng_api_common.models import JWTSecret
|
10
10
|
|
@@ -31,10 +31,8 @@ def test_authorized_jwtsecret_create_ok():
|
|
31
31
|
component=ComponentTypes.ac,
|
32
32
|
scopes=["autorisaties.credentials-registreren"],
|
33
33
|
)
|
34
|
-
|
35
|
-
|
36
|
-
]
|
37
|
-
client.credentials(HTTP_AUTHORIZATION=auth)
|
34
|
+
token = generate_jwt("pytest", "sekrit", "pytest", "pytest")
|
35
|
+
client.credentials(HTTP_AUTHORIZATION=token)
|
38
36
|
|
39
37
|
response = client.post(url, {"identifier": "foo", "secret": "bar"})
|
40
38
|
|
@@ -0,0 +1,234 @@
|
|
1
|
+
from typing import Callable, Generator
|
2
|
+
|
3
|
+
from django.apps import apps as global_apps
|
4
|
+
from django.apps.registry import Apps
|
5
|
+
from django.db import connection
|
6
|
+
from django.db.migrations.executor import MigrationExecutor
|
7
|
+
from django.test import override_settings
|
8
|
+
|
9
|
+
import pytest
|
10
|
+
from zgw_consumers.constants import APITypes, AuthTypes
|
11
|
+
|
12
|
+
|
13
|
+
class BaseMigrationTest:
|
14
|
+
app = None
|
15
|
+
migrate_from = None # The migration before the one we want to test
|
16
|
+
migrate_to = None # The migration we want to test
|
17
|
+
setting_overrides = {}
|
18
|
+
|
19
|
+
@pytest.fixture
|
20
|
+
def setup_migration(self, db) -> Generator:
|
21
|
+
"""
|
22
|
+
Setup the migration test by reversing to `migrate_from` state,
|
23
|
+
then applying the `migrate_to` state.
|
24
|
+
"""
|
25
|
+
|
26
|
+
def _migrate(callback: Callable) -> None:
|
27
|
+
assert self.app is not None, "You must define the `app` attribute"
|
28
|
+
assert self.migrate_from is not None, "You must define `migrate_from`"
|
29
|
+
assert self.migrate_to is not None, "You must define `migrate_to`"
|
30
|
+
|
31
|
+
# Step 1: Set up the MigrationExecutor
|
32
|
+
executor = MigrationExecutor(connection)
|
33
|
+
|
34
|
+
# Step 2: Reverse to the starting migration state
|
35
|
+
migrate_from = [(self.app, self.migrate_from)]
|
36
|
+
migrate_to = [(self.app, self.migrate_to)]
|
37
|
+
old_migrate_state = executor.migrate(migrate_from)
|
38
|
+
old_apps = old_migrate_state.apps
|
39
|
+
|
40
|
+
# Step 3: Call `callback` old state models
|
41
|
+
callback(old_apps)
|
42
|
+
|
43
|
+
# Step 4: Apply the migration we want to test with any settings overrides
|
44
|
+
executor = MigrationExecutor(connection)
|
45
|
+
executor.loader.build_graph() # reload the graph in case of dependency changes
|
46
|
+
executor.migrate(migrate_to)
|
47
|
+
|
48
|
+
yield _migrate
|
49
|
+
|
50
|
+
|
51
|
+
class TestMigrateAPICredentialToService(BaseMigrationTest):
|
52
|
+
app = "vng_api_common"
|
53
|
+
migrate_from = "0005_auto_20190614_1346"
|
54
|
+
migrate_to = "0006_delete_apicredential"
|
55
|
+
|
56
|
+
def test_migrate_api_credentials_to_services(self, setup_migration: Callable):
|
57
|
+
def migration_callback(apps: Apps) -> None:
|
58
|
+
Service = apps.get_model("zgw_consumers", "Service")
|
59
|
+
APICredential = apps.get_model("vng_api_common", "APICredential")
|
60
|
+
|
61
|
+
APICredential.objects.create(
|
62
|
+
api_root="https://example.com/zaken/api/v1/",
|
63
|
+
label="Zaken API",
|
64
|
+
client_id="user",
|
65
|
+
secret="secret",
|
66
|
+
user_id="user",
|
67
|
+
user_representation="User",
|
68
|
+
)
|
69
|
+
|
70
|
+
APICredential.objects.create(
|
71
|
+
api_root="https://example.com/api/v1/",
|
72
|
+
label="Selectielijst API",
|
73
|
+
client_id="user2",
|
74
|
+
secret="secret2",
|
75
|
+
user_id="user2",
|
76
|
+
user_representation="User2",
|
77
|
+
)
|
78
|
+
|
79
|
+
APICredential.objects.create(
|
80
|
+
api_root="https://example.com/documenten/api/v1/",
|
81
|
+
label="Documenten API",
|
82
|
+
client_id="user3",
|
83
|
+
secret="secret3",
|
84
|
+
user_id="user3",
|
85
|
+
user_representation="User3",
|
86
|
+
)
|
87
|
+
Service.objects.create(
|
88
|
+
api_root="https://example.com/documenten/api/v1/",
|
89
|
+
label="Documenten",
|
90
|
+
slug="already-exists",
|
91
|
+
api_type=APITypes.drc,
|
92
|
+
auth_type=AuthTypes.zgw,
|
93
|
+
client_id="user4",
|
94
|
+
secret="secret4",
|
95
|
+
user_id="user4",
|
96
|
+
user_representation="User4",
|
97
|
+
)
|
98
|
+
|
99
|
+
setup_migration(migration_callback)
|
100
|
+
|
101
|
+
Service = global_apps.get_model("zgw_consumers", "Service")
|
102
|
+
|
103
|
+
zaken_service = Service.objects.get(slug="zaken-api")
|
104
|
+
|
105
|
+
assert zaken_service.api_root == "https://example.com/zaken/api/v1/"
|
106
|
+
assert zaken_service.label == "Zaken API"
|
107
|
+
assert zaken_service.api_type == APITypes.zrc
|
108
|
+
assert zaken_service.auth_type == AuthTypes.zgw
|
109
|
+
assert zaken_service.client_id == "user"
|
110
|
+
assert zaken_service.secret == "secret"
|
111
|
+
assert zaken_service.user_id == "user"
|
112
|
+
assert zaken_service.user_representation == "User"
|
113
|
+
|
114
|
+
selectielijst_service = Service.objects.get(slug="selectielijst-api")
|
115
|
+
|
116
|
+
assert selectielijst_service.api_root == "https://example.com/api/v1/"
|
117
|
+
assert selectielijst_service.label == "Selectielijst API"
|
118
|
+
assert selectielijst_service.api_type == APITypes.orc
|
119
|
+
assert selectielijst_service.auth_type == AuthTypes.zgw
|
120
|
+
assert selectielijst_service.client_id == "user2"
|
121
|
+
assert selectielijst_service.secret == "secret2"
|
122
|
+
assert selectielijst_service.user_id == "user2"
|
123
|
+
assert selectielijst_service.user_representation == "User2"
|
124
|
+
|
125
|
+
documenten_service = Service.objects.get(slug="already-exists")
|
126
|
+
|
127
|
+
# Because there already was a service for this API root, that data is used instead
|
128
|
+
assert documenten_service.api_root == "https://example.com/documenten/api/v1/"
|
129
|
+
assert documenten_service.label == "Documenten"
|
130
|
+
assert documenten_service.api_type == APITypes.drc
|
131
|
+
assert documenten_service.auth_type == AuthTypes.zgw
|
132
|
+
assert documenten_service.client_id == "user4"
|
133
|
+
assert documenten_service.secret == "secret4"
|
134
|
+
assert documenten_service.user_id == "user4"
|
135
|
+
assert documenten_service.user_representation == "User4"
|
136
|
+
|
137
|
+
def test_duplicate_service_slug(self, setup_migration):
|
138
|
+
"""
|
139
|
+
Test that the migration handles duplicate slugs correctly
|
140
|
+
"""
|
141
|
+
|
142
|
+
def migration_callback(apps):
|
143
|
+
Service = apps.get_model("zgw_consumers", "Service")
|
144
|
+
APICredential = apps.get_model("vng_api_common", "APICredential")
|
145
|
+
|
146
|
+
APICredential.objects.create(
|
147
|
+
api_root="https://example.com/documenten/api/v1/",
|
148
|
+
label="Documenten API",
|
149
|
+
client_id="user3",
|
150
|
+
secret="secret3",
|
151
|
+
user_id="user3",
|
152
|
+
user_representation="User3",
|
153
|
+
)
|
154
|
+
|
155
|
+
Service.objects.create(
|
156
|
+
api_root="https://example.com/documenten/api/v2/",
|
157
|
+
label="Documenten",
|
158
|
+
slug="documenten-api",
|
159
|
+
api_type=APITypes.drc,
|
160
|
+
auth_type=AuthTypes.zgw,
|
161
|
+
client_id="user4",
|
162
|
+
secret="secret4",
|
163
|
+
user_id="user4",
|
164
|
+
user_representation="User4",
|
165
|
+
)
|
166
|
+
|
167
|
+
setup_migration(migration_callback)
|
168
|
+
|
169
|
+
Service = global_apps.get_model("zgw_consumers", "Service")
|
170
|
+
|
171
|
+
service_v1 = Service.objects.get(slug="documenten-api-2")
|
172
|
+
|
173
|
+
assert service_v1.api_root == "https://example.com/documenten/api/v1/"
|
174
|
+
assert service_v1.label == "Documenten API"
|
175
|
+
assert service_v1.api_type == APITypes.drc
|
176
|
+
assert service_v1.auth_type == AuthTypes.zgw
|
177
|
+
assert service_v1.client_id == "user3"
|
178
|
+
assert service_v1.secret == "secret3"
|
179
|
+
assert service_v1.user_id == "user3"
|
180
|
+
assert service_v1.user_representation == "User3"
|
181
|
+
|
182
|
+
service_v2 = Service.objects.get(slug="documenten-api")
|
183
|
+
|
184
|
+
assert service_v2.api_root == "https://example.com/documenten/api/v2/"
|
185
|
+
assert service_v2.label == "Documenten"
|
186
|
+
assert service_v2.api_type == APITypes.drc
|
187
|
+
assert service_v2.auth_type == AuthTypes.zgw
|
188
|
+
assert service_v2.client_id == "user4"
|
189
|
+
assert service_v2.secret == "secret4"
|
190
|
+
assert service_v2.user_id == "user4"
|
191
|
+
assert service_v2.user_representation == "User4"
|
192
|
+
|
193
|
+
|
194
|
+
class TestMigrateAuthorizationsConfigAPIRootToService(BaseMigrationTest):
|
195
|
+
app = "authorizations"
|
196
|
+
migrate_from = "0015_auto_20220318_1608"
|
197
|
+
migrate_to = "0016_remove_authorizationsconfig_api_root_and_more"
|
198
|
+
|
199
|
+
def test_migrate_api_root_to_service(self, setup_migration: Callable):
|
200
|
+
def migration_callback(apps: Apps) -> None:
|
201
|
+
Service = apps.get_model("zgw_consumers", "Service")
|
202
|
+
AuthorizationsConfig = apps.get_model(
|
203
|
+
"authorizations", "AuthorizationsConfig"
|
204
|
+
)
|
205
|
+
|
206
|
+
config, _ = AuthorizationsConfig.objects.get_or_create()
|
207
|
+
config.api_root = "https://example.com/autorisaties/api/v1/"
|
208
|
+
config.save()
|
209
|
+
|
210
|
+
self.service = Service.objects.create(
|
211
|
+
api_root="https://example.com/autorisaties/api/v1/",
|
212
|
+
label="Autorisaties",
|
213
|
+
slug="autorisaties",
|
214
|
+
api_type=APITypes.ac,
|
215
|
+
auth_type=AuthTypes.zgw,
|
216
|
+
client_id="user",
|
217
|
+
secret="secret",
|
218
|
+
user_id="user",
|
219
|
+
user_representation="User",
|
220
|
+
)
|
221
|
+
|
222
|
+
setup_migration(migration_callback)
|
223
|
+
|
224
|
+
AuthorizationsConfig = global_apps.get_model(
|
225
|
+
"authorizations", "AuthorizationsConfig"
|
226
|
+
)
|
227
|
+
|
228
|
+
config, _ = AuthorizationsConfig.objects.get_or_create()
|
229
|
+
|
230
|
+
assert config.authorizations_api_service.pk == self.service.pk
|
231
|
+
assert (
|
232
|
+
config.authorizations_api_service.api_root
|
233
|
+
== "https://example.com/autorisaties/api/v1/"
|
234
|
+
)
|
@@ -10,9 +10,9 @@ from rest_framework.response import Response
|
|
10
10
|
from rest_framework.test import APIRequestFactory
|
11
11
|
from rest_framework.views import APIView
|
12
12
|
|
13
|
+
from vng_api_common.authorizations.middleware import JWTAuth
|
13
14
|
from vng_api_common.authorizations.models import Applicatie, Autorisatie
|
14
15
|
from vng_api_common.constants import ComponentTypes
|
15
|
-
from vng_api_common.middleware import JWTAuth
|
16
16
|
from vng_api_common.permissions import BaseAuthRequired
|
17
17
|
from vng_api_common.scopes import Scope
|
18
18
|
from vng_api_common.tests import generate_jwt_auth
|