commonground-api-common 3.1.0__tar.gz → 3.2.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.
Files changed (264) hide show
  1. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/CHANGELOG.rst +26 -0
  2. {commonground_api_common-3.1.0/commonground_api_common.egg-info → commonground_api_common-3.2.0}/PKG-INFO +6 -3
  3. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/README.rst +3 -1
  4. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0/commonground_api_common.egg-info}/PKG-INFO +6 -3
  5. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/commonground_api_common.egg-info/SOURCES.txt +3 -0
  6. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/commonground_api_common.egg-info/requires.txt +2 -1
  7. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/pyproject.toml +4 -3
  8. commonground_api_common-3.2.0/tests/test_applicatie_alleen_is_gereed_voor_publicatie.py +148 -0
  9. commonground_api_common-3.2.0/tests/test_fields.py +63 -0
  10. commonground_api_common-3.2.0/tests/test_filters.py +102 -0
  11. commonground_api_common-3.2.0/tests/test_serializer_fields.py +324 -0
  12. commonground_api_common-3.2.0/tests/test_urn_serializers.py +362 -0
  13. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_validators.py +78 -0
  14. commonground_api_common-3.2.0/vng_api_common/__init__.py +1 -0
  15. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/apps.py +3 -1
  16. commonground_api_common-3.2.0/vng_api_common/authorizations/migrations/0019_applicatie_alleen_is_gereed_voor_publicatie.py +22 -0
  17. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/models.py +9 -0
  18. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/serializers.py +1 -0
  19. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/client.py +10 -0
  20. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/fields.py +19 -1
  21. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/filters.py +59 -0
  22. commonground_api_common-3.2.0/vng_api_common/locale/nl/LC_MESSAGES/django.mo +0 -0
  23. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/locale/nl/LC_MESSAGES/django.po +153 -103
  24. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/serializers.py +289 -0
  25. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/settings.py +2 -3
  26. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/validators.py +78 -0
  27. commonground_api_common-3.1.0/tests/test_fields.py +0 -25
  28. commonground_api_common-3.1.0/tests/test_filters.py +0 -28
  29. commonground_api_common-3.1.0/tests/test_serializer_fields.py +0 -58
  30. commonground_api_common-3.1.0/vng_api_common/__init__.py +0 -1
  31. commonground_api_common-3.1.0/vng_api_common/locale/nl/LC_MESSAGES/django.mo +0 -0
  32. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/MANIFEST.in +0 -0
  33. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/commonground_api_common.egg-info/dependency_links.txt +0 -0
  34. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/commonground_api_common.egg-info/not-zip-safe +0 -0
  35. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/commonground_api_common.egg-info/top_level.txt +0 -0
  36. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/setup.cfg +0 -0
  37. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_autorisatie_validation.py +0 -0
  38. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_cache_headers.py +0 -0
  39. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_cached_hyperlinkrelatedfields.py +0 -0
  40. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_check_query_params.py +0 -0
  41. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_checks.py +0 -0
  42. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_choices.py +0 -0
  43. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_configuration_steps_applicaties.py +0 -0
  44. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_configuration_steps_jwtsecrets.py +0 -0
  45. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_content_type_headers.py +0 -0
  46. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_algebra.py +0 -0
  47. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_batch.py +0 -0
  48. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_bulk.py +0 -0
  49. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_concurrency.py +0 -0
  50. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_cost.py +0 -0
  51. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_deadlocks.py +0 -0
  52. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_deploys.py +0 -0
  53. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_oracle.py +0 -0
  54. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_processes.py +0 -0
  55. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_registry.py +0 -0
  56. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_etag_responses.py +0 -0
  57. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_exception_camelize.py +0 -0
  58. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_exception_handler.py +0 -0
  59. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_field_extensions.py +0 -0
  60. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_filter_extension.py +0 -0
  61. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_gegevensgroepen.py +0 -0
  62. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_get_resource.py +0 -0
  63. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_jwt_decoding.py +0 -0
  64. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_migrations.py +0 -0
  65. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_nested_serializer_validation.py +0 -0
  66. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_notes.py +0 -0
  67. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_pagination.py +0 -0
  68. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_permissions.py +0 -0
  69. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_publish_validators.py +0 -0
  70. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_schema.py +0 -0
  71. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_scopes.py +0 -0
  72. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_serializer_extensions.py +0 -0
  73. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_server_errors.py +0 -0
  74. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_utils.py +0 -0
  75. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/tests/test_views.py +0 -0
  76. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/admin.py +0 -0
  77. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/api/__init__.py +0 -0
  78. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/api/permissions.py +0 -0
  79. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/api/serializers.py +0 -0
  80. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/__init__.py +0 -0
  81. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/admin.py +0 -0
  82. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/api/__init__.py +0 -0
  83. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/api/scopes.py +0 -0
  84. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/api/serializers.py +0 -0
  85. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/apps.py +0 -0
  86. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/audits.py +0 -0
  87. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0001_initial.py +0 -0
  88. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0002_auto_20190516_0830.py +0 -0
  89. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0003_auto_20190517_0844.py +0 -0
  90. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0004_auto_20190520_1238.py +0 -0
  91. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0005_auto_20190520_1450.py +0 -0
  92. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0006_audittrail_toelichting.py +0 -0
  93. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0007_auto_20190522_0916.py +0 -0
  94. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0008_audittrail_resource_weergave.py +0 -0
  95. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0009_auto_20190712_1643.py +0 -0
  96. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0010_audittrail_request_id.py +0 -0
  97. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0011_auto_20190918_1335.py +0 -0
  98. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0012_auto_20200619_0545.py +0 -0
  99. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0012_remove_audittrail_request_id.py +0 -0
  100. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0013_audittrail_logrecord_id.py +0 -0
  101. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0013_auto_20201207_0846.py +0 -0
  102. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0014_auto_20201221_0905.py +0 -0
  103. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0014_auto_20210323_1654.py +0 -0
  104. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0015_auto_20220318_1608.py +0 -0
  105. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0016_merge_20220607_0517.py +0 -0
  106. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0017_alter_audittrail_bron.py +0 -0
  107. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0018_auto_20221212_0745.py +0 -0
  108. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/0019_alter_audittrail_options.py +0 -0
  109. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/__init__.py +0 -0
  110. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/migrations/_operations.py +0 -0
  111. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/models.py +0 -0
  112. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/utils.py +0 -0
  113. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/audittrails/viewsets.py +0 -0
  114. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/__init__.py +0 -0
  115. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/admin.py +0 -0
  116. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/middleware.py +0 -0
  117. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0001_initial.py +0 -0
  118. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0002_authorizationsconfig.py +0 -0
  119. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0003_auto_20190502_0409.py +0 -0
  120. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0004_auto_20190503_0941.py +0 -0
  121. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0005_auto_20190506_0842.py +0 -0
  122. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0006_auto_20190506_0901.py +0 -0
  123. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0007_auto_20190506_1212.py +0 -0
  124. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0008_auto_20190712_1541.py +0 -0
  125. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0009_update_enums.py +0 -0
  126. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0010_auto_20190712_1643.py +0 -0
  127. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0011_auto_20191114_0728.py +0 -0
  128. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0012_auto_20200619_0545.py +0 -0
  129. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0013_auto_20201207_0846.py +0 -0
  130. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0014_auto_20201221_0905.py +0 -0
  131. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0015_auto_20220318_1608.py +0 -0
  132. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0016_remove_authorizationsconfig_api_root_and_more.py +0 -0
  133. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0017_alter_applicatie_client_ids_and_more.py +0 -0
  134. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/0018_alter_applicatie_options_alter_autorisatie_options.py +0 -0
  135. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/migrations/__init__.py +0 -0
  136. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/utils.py +0 -0
  137. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/authorizations/validators.py +0 -0
  138. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/__init__.py +0 -0
  139. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/bulk.py +0 -0
  140. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/conditional.py +0 -0
  141. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/decorators.py +0 -0
  142. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/etags.py +0 -0
  143. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/introspection.py +0 -0
  144. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/models.py +0 -0
  145. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/registry.py +0 -0
  146. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/signals.py +0 -0
  147. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/caching/store.py +0 -0
  148. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/checks.py +0 -0
  149. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/choices.py +0 -0
  150. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/compat.py +0 -0
  151. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/conf/__init__.py +0 -0
  152. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/conf/api.py +0 -0
  153. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/constants.py +0 -0
  154. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/contrib/__init__.py +0 -0
  155. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/contrib/setup_configuration/__init__.py +0 -0
  156. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/contrib/setup_configuration/models.py +0 -0
  157. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/contrib/setup_configuration/steps.py +0 -0
  158. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/db/__init__.py +0 -0
  159. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/db/operations.py +0 -0
  160. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/descriptors.py +0 -0
  161. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/diagrams/__init__.py +0 -0
  162. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/diagrams/generate_graphs.py +0 -0
  163. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/diagrams/uml_images.py +0 -0
  164. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/doc.py +0 -0
  165. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/exception_handling.py +0 -0
  166. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/exceptions.py +0 -0
  167. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/extensions/__init__.py +0 -0
  168. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/extensions/file.py +0 -0
  169. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/extensions/gegevensgroep.py +0 -0
  170. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/extensions/geojson.py +0 -0
  171. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/extensions/hyperlink.py +0 -0
  172. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/extensions/polymorphic.py +0 -0
  173. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/extensions/query.py +0 -0
  174. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/filters_backend.py +0 -0
  175. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/filtersets.py +0 -0
  176. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/generators.py +0 -0
  177. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/geo.py +0 -0
  178. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/middleware.py +0 -0
  179. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0001_initial.py +0 -0
  180. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0002_apicredential.py +0 -0
  181. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0003_auto_20190417_1145.py +0 -0
  182. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0004_auto_20190517_0903.py +0 -0
  183. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0005_auto_20190614_1346.py +0 -0
  184. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0006_delete_apicredential.py +0 -0
  185. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0007_alter_jwtsecret_options.py +0 -0
  186. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/0008_storedetag.py +0 -0
  187. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/migrations/__init__.py +0 -0
  188. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/mocks.py +0 -0
  189. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/models.py +0 -0
  190. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notes/__init__.py +0 -0
  191. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notes/api/__init__.py +0 -0
  192. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notes/api/serializers.py +0 -0
  193. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notes/api/viewsets.py +0 -0
  194. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notes/apps.py +0 -0
  195. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notes/constants.py +0 -0
  196. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notes/models.py +0 -0
  197. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/__init__.py +0 -0
  198. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/api/__init__.py +0 -0
  199. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/api/urls.py +0 -0
  200. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/api/views.py +0 -0
  201. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/apps.py +0 -0
  202. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/handlers.py +0 -0
  203. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0001_initial.py +0 -0
  204. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0002_subscription__subscription.py +0 -0
  205. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0003_auto_20190319_1048.py +0 -0
  206. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0004_auto_20190325_1313.py +0 -0
  207. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0005_fix_default_nrc.py +0 -0
  208. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0006_auto_20190417_1142.py +0 -0
  209. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0007_auto_20190429_1442.py +0 -0
  210. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0008_auto_20190502_0415.py +0 -0
  211. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0009_auto_20190729_0427.py +0 -0
  212. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0010_auto_20220704_1419.py +0 -0
  213. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/0011_remove_subscription_config_and_more.py +0 -0
  214. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/notifications/migrations/__init__.py +0 -0
  215. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/oas.py +0 -0
  216. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/pagination.py +0 -0
  217. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/permissions.py +0 -0
  218. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/polymorphism.py +0 -0
  219. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/routers.py +0 -0
  220. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/schema.py +0 -0
  221. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/scopes.py +0 -0
  222. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/search.py +0 -0
  223. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/css/admin/admin_overrides.css +0 -0
  224. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/css/screen.css +0 -0
  225. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/ico/favicon.png +0 -0
  226. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/img/vng.svg +0 -0
  227. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/LICENSE.txt +0 -0
  228. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.css +0 -0
  229. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.min.css +0 -0
  230. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.eot +0 -0
  231. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.svg +0 -0
  232. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.ttf +0 -0
  233. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff +0 -0
  234. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
  235. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.eot +0 -0
  236. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.svg +0 -0
  237. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.ttf +0 -0
  238. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff +0 -0
  239. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
  240. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.eot +0 -0
  241. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.svg +0 -0
  242. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  243. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff +0 -0
  244. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  245. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templates/vng_api_common/admin/base_site.html +0 -0
  246. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templates/vng_api_common/includes/kanalen_card.html +0 -0
  247. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templates/vng_api_common/index.html +0 -0
  248. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templates/vng_api_common/master.html +0 -0
  249. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templates/vng_api_common/ref/error_detail.html +0 -0
  250. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templates/vng_api_common/ref/scopes.html +0 -0
  251. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templates/vng_api_common/view_config.html +0 -0
  252. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templatetags/__init__.py +0 -0
  253. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/templatetags/vng_api_common.py +0 -0
  254. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/tests/__init__.py +0 -0
  255. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/tests/auth.py +0 -0
  256. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/tests/caching.py +0 -0
  257. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/tests/schema.py +0 -0
  258. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/tests/urls.py +0 -0
  259. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/tests/utils.py +0 -0
  260. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/urls.py +0 -0
  261. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/utils.py +0 -0
  262. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/version.py +0 -0
  263. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/views.py +0 -0
  264. {commonground_api_common-3.1.0 → commonground_api_common-3.2.0}/vng_api_common/viewsets.py +0 -0
@@ -2,6 +2,32 @@
2
2
  Change history
3
3
  ==============
4
4
 
5
+ 3.2.0 (2026-11-11)
6
+ ------------------
7
+
8
+ **New features**
9
+
10
+ * [open-zaak/open-zaak#2452] Add ``alleen_is_gereed_voor_publicatie`` to ``Applicatie`` and its
11
+ serializer. This flag indicates that an application may only read documents
12
+ with ``isGereedVoorPublicatie`` set to ``true``. It defaults to ``false``.
13
+
14
+ * [open-zaak/open-zaak#2537] Add a reusable ``URNField`` and
15
+ ``URNValidator`` for URN values. The field extends ``CharField`` with a
16
+ maximum length of 255 characters and validates URN syntax (RFC 8141) using ABNF.
17
+
18
+ 3.1.1 (2026-10-23)
19
+ ------------------
20
+
21
+ **Security**
22
+
23
+ * Require ``certifi>=2026.10.19``, which no longer trusts the eMudhra root whose
24
+ intermediate CA keys were compromised. Also update ``pip`` to 26.2.2 or later and
25
+ rebuild your images without cache, to update the system certificates. See the
26
+ `Python advisory <https://discuss.python.org/t/information-for-python-users-regarding-emudhra-emsign-ca-certificate-security-incident/109576>`_.
27
+ * Require ``PyJWT>=2.15.1``. Older versions have known vulnerabilities, among
28
+ them a ``RecursionError`` on a deeply nested JWT, which anyone could trigger
29
+ without credentials and which gave a 500 (CVE-2026-101918). It is now a 403.
30
+
5
31
  3.1.0 (2026-10-23)
6
32
  ------------------
7
33
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commonground-api-common
3
- Version: 3.1.0
3
+ Version: 3.2.0
4
4
  Summary: Commonground API tooling
5
5
  Author-email: "Maykin Media, VNG-Realisatie" <support@maykinmedia.nl>
6
6
  License-Expression: MIT
@@ -36,8 +36,9 @@ Requires-Dist: iso639-lang
36
36
  Requires-Dist: notifications-api-common>=0.3.1
37
37
  Requires-Dist: zgw-consumers>=1.0.0
38
38
  Requires-Dist: oyaml
39
- Requires-Dist: PyJWT>=2.10.1
39
+ Requires-Dist: PyJWT>=2.15.1
40
40
  Requires-Dist: requests
41
+ Requires-Dist: certifi>=2026.10.19
41
42
  Requires-Dist: ape-pie
42
43
  Requires-Dist: sentry-sdk
43
44
  Requires-Dist: structlog
@@ -89,7 +90,7 @@ Commonground-API-common - Tooling voor RESTful APIs
89
90
  ===================================================
90
91
 
91
92
 
92
- :Version: 3.1.0
93
+ :Version: 3.2.0
93
94
  :Source: https://github.com/maykinmedia/commonground-api-common
94
95
  :PythonVersion: 3.12
95
96
 
@@ -129,6 +130,7 @@ Features
129
130
  * ``IsImmutableValidator`` - valideer dat bepaalde velden niet gewijzigd
130
131
  worden bij een (partial) update, maar wel mogen gezet worden bij een create
131
132
  * ``ResourceValidator`` - valideer dat een URL een bepaalde resource ontsluit
133
+ * ``URNValidator`` - valideer de URN-syntaxis volgens de ABNF-regels zoals gedefinieerd in RFC 8141
132
134
  * Custom inspectors voor drf-yasg:
133
135
  * Support voor ``rest_framework_gis`` ``GeometryField``
134
136
  * SUpport voor ``django-extra-fields`` ``Base64FieldMixin``
@@ -145,6 +147,7 @@ Features
145
147
  * ``LanguageField``
146
148
  * ``VertrouwelijkheidsAanduidingField``
147
149
  * ``DurationField``
150
+ * ``URNField``
148
151
  * Mocks voor de validators die netwerk IO hebben, eenvoudig via
149
152
  ``@override_settings`` toe te passen
150
153
  * Test utilities
@@ -3,7 +3,7 @@ Commonground-API-common - Tooling voor RESTful APIs
3
3
  ===================================================
4
4
 
5
5
 
6
- :Version: 3.1.0
6
+ :Version: 3.2.0
7
7
  :Source: https://github.com/maykinmedia/commonground-api-common
8
8
  :PythonVersion: 3.12
9
9
 
@@ -43,6 +43,7 @@ Features
43
43
  * ``IsImmutableValidator`` - valideer dat bepaalde velden niet gewijzigd
44
44
  worden bij een (partial) update, maar wel mogen gezet worden bij een create
45
45
  * ``ResourceValidator`` - valideer dat een URL een bepaalde resource ontsluit
46
+ * ``URNValidator`` - valideer de URN-syntaxis volgens de ABNF-regels zoals gedefinieerd in RFC 8141
46
47
  * Custom inspectors voor drf-yasg:
47
48
  * Support voor ``rest_framework_gis`` ``GeometryField``
48
49
  * SUpport voor ``django-extra-fields`` ``Base64FieldMixin``
@@ -59,6 +60,7 @@ Features
59
60
  * ``LanguageField``
60
61
  * ``VertrouwelijkheidsAanduidingField``
61
62
  * ``DurationField``
63
+ * ``URNField``
62
64
  * Mocks voor de validators die netwerk IO hebben, eenvoudig via
63
65
  ``@override_settings`` toe te passen
64
66
  * Test utilities
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commonground-api-common
3
- Version: 3.1.0
3
+ Version: 3.2.0
4
4
  Summary: Commonground API tooling
5
5
  Author-email: "Maykin Media, VNG-Realisatie" <support@maykinmedia.nl>
6
6
  License-Expression: MIT
@@ -36,8 +36,9 @@ Requires-Dist: iso639-lang
36
36
  Requires-Dist: notifications-api-common>=0.3.1
37
37
  Requires-Dist: zgw-consumers>=1.0.0
38
38
  Requires-Dist: oyaml
39
- Requires-Dist: PyJWT>=2.10.1
39
+ Requires-Dist: PyJWT>=2.15.1
40
40
  Requires-Dist: requests
41
+ Requires-Dist: certifi>=2026.10.19
41
42
  Requires-Dist: ape-pie
42
43
  Requires-Dist: sentry-sdk
43
44
  Requires-Dist: structlog
@@ -89,7 +90,7 @@ Commonground-API-common - Tooling voor RESTful APIs
89
90
  ===================================================
90
91
 
91
92
 
92
- :Version: 3.1.0
93
+ :Version: 3.2.0
93
94
  :Source: https://github.com/maykinmedia/commonground-api-common
94
95
  :PythonVersion: 3.12
95
96
 
@@ -129,6 +130,7 @@ Features
129
130
  * ``IsImmutableValidator`` - valideer dat bepaalde velden niet gewijzigd
130
131
  worden bij een (partial) update, maar wel mogen gezet worden bij een create
131
132
  * ``ResourceValidator`` - valideer dat een URL een bepaalde resource ontsluit
133
+ * ``URNValidator`` - valideer de URN-syntaxis volgens de ABNF-regels zoals gedefinieerd in RFC 8141
132
134
  * Custom inspectors voor drf-yasg:
133
135
  * Support voor ``rest_framework_gis`` ``GeometryField``
134
136
  * SUpport voor ``django-extra-fields`` ``Base64FieldMixin``
@@ -145,6 +147,7 @@ Features
145
147
  * ``LanguageField``
146
148
  * ``VertrouwelijkheidsAanduidingField``
147
149
  * ``DurationField``
150
+ * ``URNField``
148
151
  * Mocks voor de validators die netwerk IO hebben, eenvoudig via
149
152
  ``@override_settings`` toe te passen
150
153
  * Test utilities
@@ -8,6 +8,7 @@ commonground_api_common.egg-info/dependency_links.txt
8
8
  commonground_api_common.egg-info/not-zip-safe
9
9
  commonground_api_common.egg-info/requires.txt
10
10
  commonground_api_common.egg-info/top_level.txt
11
+ tests/test_applicatie_alleen_is_gereed_voor_publicatie.py
11
12
  tests/test_autorisatie_validation.py
12
13
  tests/test_cache_headers.py
13
14
  tests/test_cached_hyperlinkrelatedfields.py
@@ -48,6 +49,7 @@ tests/test_scopes.py
48
49
  tests/test_serializer_extensions.py
49
50
  tests/test_serializer_fields.py
50
51
  tests/test_server_errors.py
52
+ tests/test_urn_serializers.py
51
53
  tests/test_utils.py
52
54
  tests/test_validators.py
53
55
  tests/test_views.py
@@ -150,6 +152,7 @@ vng_api_common/authorizations/migrations/0015_auto_20220318_1608.py
150
152
  vng_api_common/authorizations/migrations/0016_remove_authorizationsconfig_api_root_and_more.py
151
153
  vng_api_common/authorizations/migrations/0017_alter_applicatie_client_ids_and_more.py
152
154
  vng_api_common/authorizations/migrations/0018_alter_applicatie_options_alter_autorisatie_options.py
155
+ vng_api_common/authorizations/migrations/0019_applicatie_alleen_is_gereed_voor_publicatie.py
153
156
  vng_api_common/authorizations/migrations/__init__.py
154
157
  vng_api_common/caching/__init__.py
155
158
  vng_api_common/caching/bulk.py
@@ -10,8 +10,9 @@ iso639-lang
10
10
  notifications-api-common>=0.3.1
11
11
  zgw-consumers>=1.0.0
12
12
  oyaml
13
- PyJWT>=2.10.1
13
+ PyJWT>=2.15.1
14
14
  requests
15
+ certifi>=2026.10.19
15
16
  ape-pie
16
17
  sentry-sdk
17
18
  structlog
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "commonground-api-common"
7
- version = "3.1.0"
7
+ version = "3.2.0"
8
8
  description = "Commonground API tooling"
9
9
  readme = "README.rst"
10
10
  license = "MIT"
@@ -44,8 +44,9 @@ dependencies = [
44
44
  "notifications-api-common>=0.3.1",
45
45
  "zgw-consumers>=1.0.0",
46
46
  "oyaml",
47
- "PyJWT>=2.10.1",
47
+ "PyJWT>=2.15.1",
48
48
  "requests",
49
+ "certifi>=2026.10.19", # required through requests, bounded for 🔒
49
50
  "ape-pie",
50
51
  "sentry-sdk",
51
52
  "structlog",
@@ -157,7 +158,7 @@ exclude_also = [
157
158
  ]
158
159
 
159
160
  [tool.bumpversion]
160
- current_version = "3.1.0"
161
+ current_version = "3.2.0"
161
162
  files = [
162
163
  {filename = "pyproject.toml"},
163
164
  {filename = "README.rst"},
@@ -0,0 +1,148 @@
1
+ import pytest
2
+
3
+ from vng_api_common.authorizations.models import Applicatie
4
+ from vng_api_common.authorizations.serializers import ApplicatieSerializer
5
+
6
+
7
+ @pytest.mark.django_db
8
+ def test_alleen_is_gereed_voor_publicatie_defaults_to_false():
9
+ applicatie = Applicatie.objects.create(client_ids=["consumer"], label="Consumer")
10
+
11
+ applicatie.refresh_from_db()
12
+
13
+ assert applicatie.alleen_is_gereed_voor_publicatie is False
14
+
15
+
16
+ @pytest.mark.django_db
17
+ def test_serializer_defaults_to_false():
18
+ serializer = ApplicatieSerializer(
19
+ data={
20
+ "client_ids": ["consumer"],
21
+ "label": "Consumer",
22
+ "heeft_alle_autorisaties": True,
23
+ }
24
+ )
25
+
26
+ assert serializer.is_valid(), serializer.errors
27
+ applicatie = serializer.save()
28
+ applicatie.refresh_from_db()
29
+
30
+ assert applicatie.alleen_is_gereed_voor_publicatie is False
31
+
32
+
33
+ @pytest.mark.django_db
34
+ @pytest.mark.parametrize("alleen_is_gereed_voor_publicatie", [True, False])
35
+ def test_serializer_saves_alleen_is_gereed_voor_publicatie(
36
+ alleen_is_gereed_voor_publicatie,
37
+ ):
38
+ serializer = ApplicatieSerializer(
39
+ data={
40
+ "client_ids": ["consumer"],
41
+ "label": "Consumer",
42
+ "heeft_alle_autorisaties": True,
43
+ "alleen_is_gereed_voor_publicatie": alleen_is_gereed_voor_publicatie,
44
+ }
45
+ )
46
+
47
+ assert serializer.is_valid(), serializer.errors
48
+ applicatie = serializer.save()
49
+ applicatie.refresh_from_db()
50
+
51
+ assert (
52
+ applicatie.alleen_is_gereed_voor_publicatie is alleen_is_gereed_voor_publicatie
53
+ )
54
+
55
+
56
+ @pytest.mark.django_db
57
+ def test_serializer_enables_alleen_is_gereed_voor_publicatie():
58
+ applicatie = Applicatie.objects.create(
59
+ client_ids=["consumer"],
60
+ label="Consumer",
61
+ heeft_alle_autorisaties=True,
62
+ alleen_is_gereed_voor_publicatie=False,
63
+ )
64
+ serializer = ApplicatieSerializer(
65
+ applicatie,
66
+ data={"alleen_is_gereed_voor_publicatie": True},
67
+ partial=True,
68
+ )
69
+
70
+ assert serializer.is_valid(), serializer.errors
71
+ serializer.save()
72
+ applicatie.refresh_from_db()
73
+
74
+ assert applicatie.alleen_is_gereed_voor_publicatie is True
75
+
76
+
77
+ @pytest.mark.django_db
78
+ def test_serializer_disables_alleen_is_gereed_voor_publicatie():
79
+ applicatie = Applicatie.objects.create(
80
+ client_ids=["consumer"],
81
+ label="Consumer",
82
+ heeft_alle_autorisaties=True,
83
+ alleen_is_gereed_voor_publicatie=True,
84
+ )
85
+ serializer = ApplicatieSerializer(
86
+ applicatie,
87
+ data={"alleen_is_gereed_voor_publicatie": False},
88
+ partial=True,
89
+ )
90
+
91
+ assert serializer.is_valid(), serializer.errors
92
+ serializer.save()
93
+ applicatie.refresh_from_db()
94
+
95
+ assert applicatie.alleen_is_gereed_voor_publicatie is False
96
+
97
+
98
+ @pytest.mark.django_db
99
+ def test_partial_update_preserves_alleen_is_gereed_voor_publicatie_when_omitted():
100
+ applicatie = Applicatie.objects.create(
101
+ client_ids=["consumer"],
102
+ label="Consumer",
103
+ heeft_alle_autorisaties=True,
104
+ alleen_is_gereed_voor_publicatie=True,
105
+ )
106
+ serializer = ApplicatieSerializer(
107
+ applicatie, data={"label": "Updated consumer"}, partial=True
108
+ )
109
+
110
+ assert serializer.is_valid(), serializer.errors
111
+ serializer.save()
112
+ applicatie.refresh_from_db()
113
+
114
+ assert applicatie.alleen_is_gereed_voor_publicatie is True
115
+
116
+
117
+ @pytest.mark.django_db
118
+ def test_serializer_rejects_null_for_alleen_is_gereed_voor_publicatie():
119
+ serializer = ApplicatieSerializer(
120
+ data={
121
+ "client_ids": ["consumer"],
122
+ "label": "Consumer",
123
+ "heeft_alle_autorisaties": True,
124
+ "alleen_is_gereed_voor_publicatie": None,
125
+ }
126
+ )
127
+
128
+ assert not serializer.is_valid()
129
+ assert serializer.errors["alleen_is_gereed_voor_publicatie"] == [
130
+ "This field may not be null."
131
+ ]
132
+
133
+
134
+ @pytest.mark.django_db
135
+ def test_serializer_rejects_text_for_alleen_is_gereed_voor_publicatie():
136
+ serializer = ApplicatieSerializer(
137
+ data={
138
+ "client_ids": ["consumer"],
139
+ "label": "Consumer",
140
+ "heeft_alle_autorisaties": True,
141
+ "alleen_is_gereed_voor_publicatie": "invalid",
142
+ }
143
+ )
144
+
145
+ assert not serializer.is_valid()
146
+ assert serializer.errors["alleen_is_gereed_voor_publicatie"] == [
147
+ "Must be a valid boolean."
148
+ ]
@@ -0,0 +1,63 @@
1
+ from django.core.exceptions import ValidationError
2
+
3
+ import pytest
4
+
5
+ from testapp.models import Medewerker
6
+ from vng_api_common.fields import URNField
7
+
8
+
9
+ def test_bsn_length():
10
+ with pytest.raises(ValidationError):
11
+ Medewerker(bsn="11122233").full_clean()
12
+
13
+ with pytest.raises(ValidationError):
14
+ Medewerker(bsn="1112223333").full_clean()
15
+
16
+ Medewerker(bsn="111222333").full_clean()
17
+
18
+
19
+ def test_rsin_length():
20
+ with pytest.raises(ValidationError):
21
+ Medewerker(rsin="11122233").full_clean()
22
+
23
+ with pytest.raises(ValidationError):
24
+ Medewerker(rsin="1112223333").full_clean()
25
+
26
+ Medewerker(rsin="111222333").full_clean()
27
+
28
+
29
+ @pytest.mark.parametrize("max_length", [255, 512])
30
+ def test_urn_field_length(max_length):
31
+ field = URNField(max_length=max_length)
32
+ value = "urn:example:".ljust(max_length, "a")
33
+
34
+ assert field.max_length == max_length
35
+ assert field.clean(value, None) == value
36
+ with pytest.raises(ValidationError) as error:
37
+ field.clean(value + "a", None)
38
+ assert error.value.error_list[0].code == "max_length"
39
+
40
+
41
+ def test_urn_field_validation():
42
+ field = URNField()
43
+
44
+ assert field.clean("urn:example:document", None) == "urn:example:document"
45
+ with pytest.raises(ValidationError) as error:
46
+ field.clean("https://example.com/document", None)
47
+ assert error.value.error_list[0].code == "invalid_urn"
48
+
49
+
50
+ @pytest.mark.parametrize(
51
+ "kwargs", [{}, {"max_length": 512, "blank": True, "null": True}]
52
+ )
53
+ def test_urn_field_deconstruction(kwargs):
54
+ field = URNField(**kwargs)
55
+
56
+ _, path, args, reconstructed_kwargs = field.deconstruct()
57
+ reconstructed = URNField(*args, **reconstructed_kwargs)
58
+
59
+ assert path == "vng_api_common.fields.URNField"
60
+ assert reconstructed.max_length == field.max_length
61
+ assert reconstructed.blank == field.blank
62
+ assert reconstructed.null == field.null
63
+ assert reconstructed.validators == field.validators
@@ -0,0 +1,102 @@
1
+ from django.core.exceptions import ValidationError
2
+ from django.db import models
3
+
4
+ import pytest
5
+
6
+ from testapp.models import Person
7
+ from vng_api_common.constants import FILTER_URL_DID_NOT_RESOLVE
8
+ from vng_api_common.filters import ListURNFilter, URLModelChoiceField, URNFilter
9
+ from vng_api_common.utils import NotAViewSet
10
+
11
+
12
+ def test_filter_field_url_to_pk_trailing_slash():
13
+ field = URLModelChoiceField(queryset=Person.objects.all())
14
+ with pytest.raises(NotAViewSet):
15
+ field.url_to_pk("https://google.com/")
16
+
17
+
18
+ def test_filter_field_to_python_trailing_slash():
19
+ field = URLModelChoiceField(queryset=Person.objects.all())
20
+ value = field.to_python("https://google.com/")
21
+ assert value == FILTER_URL_DID_NOT_RESOLVE
22
+
23
+
24
+ def test_filter_field_to_python_invalid_url_raises_error():
25
+ field = URLModelChoiceField(queryset=Person.objects.all())
26
+ with pytest.raises(ValidationError) as exc:
27
+ field.to_python("thisisnotaurl")
28
+
29
+ assert exc.value.code == "invalid"
30
+
31
+
32
+ @pytest.mark.parametrize("filter_class", [URNFilter, ListURNFilter])
33
+ @pytest.mark.parametrize("value", [None, "", [], (), {}])
34
+ def test_urn_filters_empty_value_leaves_queryset_unchanged(filter_class, value):
35
+ queryset = Person.objects.all()
36
+
37
+ assert filter_class(field_name="name").filter(queryset, value) is queryset
38
+
39
+
40
+ @pytest.mark.django_db
41
+ @pytest.mark.parametrize("exclude", [False, True])
42
+ @pytest.mark.parametrize("value", ["urn", "example", "42", "a.b+", "missing"])
43
+ def test_urn_filter_matches_whole_literal_segments(value, exclude):
44
+ urns = [
45
+ "urn:example:42",
46
+ "urn:examples:142",
47
+ "urn:example:a.b+",
48
+ "urn:example:axb",
49
+ "urn:Example:42extra",
50
+ ]
51
+ people = [Person.objects.create(name=urn) for urn in urns]
52
+ queryset = Person.objects.all()
53
+
54
+ result = URNFilter(field_name="name", exclude=exclude).filter(queryset, value)
55
+
56
+ assert set(result) == {
57
+ person for person in people if (value in person.name.split(":")) != exclude
58
+ }
59
+
60
+
61
+ @pytest.mark.django_db
62
+ @pytest.mark.parametrize("json_key", [None, "reference"])
63
+ @pytest.mark.parametrize("exclude", [False, True])
64
+ @pytest.mark.parametrize("value", ["urn", "example", "42", "a.b+", "missing"])
65
+ def test_list_urn_filter_matches_supported_json_shapes(
66
+ json_key, value, exclude, django_assert_num_queries
67
+ ):
68
+ key = json_key or "urn"
69
+ rows = [
70
+ (["urn:example:42", "urn:other:42"], {"urn", "example", "42"}),
71
+ ([{key: "urn:example:a.b+", "label": "other"}], {"urn", "example", "a.b+"}),
72
+ (["urn:examples:142", {key: "urn:other:axb"}], {"urn"}),
73
+ ([None, "", {}, {"label": "urn:example:42"}], set()),
74
+ ([], set()),
75
+ (None, set()),
76
+ ({key: "urn:example:42"}, set()), # not a list
77
+ ("urn:example:42", set()), # not a list
78
+ ]
79
+ cases = []
80
+ expected_pks = set()
81
+ for items, matching_values in rows:
82
+ person = Person.objects.create(name="test")
83
+ cases.append(
84
+ models.When(
85
+ pk=person.pk,
86
+ then=models.Value(items, output_field=models.JSONField()),
87
+ )
88
+ )
89
+ if (value in matching_values) != exclude:
90
+ expected_pks.add(person.pk)
91
+
92
+ queryset = Person.objects.annotate(
93
+ references=models.Case(*cases, output_field=models.JSONField())
94
+ )
95
+ kwargs = {"json_key": json_key} if json_key else {}
96
+ urn_filter = ListURNFilter(field_name="references", exclude=exclude, **kwargs)
97
+
98
+ with django_assert_num_queries(0):
99
+ result = urn_filter.filter(queryset, value)
100
+
101
+ with django_assert_num_queries(1):
102
+ assert set(result.values_list("pk", flat=True)) == expected_pks