commonground-api-common 2.1.2__tar.gz → 2.3.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 (247) hide show
  1. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/CHANGELOG.rst +15 -0
  2. {commonground_api_common-2.1.2/commonground_api_common.egg-info → commonground_api_common-2.3.0}/PKG-INFO +12 -3
  3. commonground_api_common-2.1.2/bin/patch_content_types → commonground_api_common-2.3.0/bin/generate_schema +2 -4
  4. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0/commonground_api_common.egg-info}/PKG-INFO +12 -3
  5. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/commonground_api_common.egg-info/SOURCES.txt +18 -22
  6. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/commonground_api_common.egg-info/requires.txt +13 -1
  7. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/setup.cfg +12 -4
  8. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_cache_headers.py +14 -14
  9. commonground_api_common-2.3.0/tests/test_configuration_steps_applicaties.py +82 -0
  10. commonground_api_common-2.3.0/tests/test_configuration_steps_jwtsecrets.py +62 -0
  11. commonground_api_common-2.3.0/tests/test_content_type_headers.py +76 -0
  12. commonground_api_common-2.3.0/tests/test_field_extensions.py +302 -0
  13. commonground_api_common-2.3.0/tests/test_filter_extension.py +53 -0
  14. commonground_api_common-2.3.0/tests/test_schema.py +238 -0
  15. commonground_api_common-2.3.0/tests/test_serializer_extensions.py +75 -0
  16. commonground_api_common-2.3.0/vng_api_common/__init__.py +1 -0
  17. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/api/views.py +1 -0
  18. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/apps.py +43 -26
  19. commonground_api_common-2.3.0/vng_api_common/audittrails/utils.py +44 -0
  20. commonground_api_common-2.3.0/vng_api_common/conf/api.py +100 -0
  21. commonground_api_common-2.3.0/vng_api_common/contrib/setup_configuration/models.py +32 -0
  22. commonground_api_common-2.3.0/vng_api_common/contrib/setup_configuration/steps.py +46 -0
  23. commonground_api_common-2.3.0/vng_api_common/extensions/file.py +26 -0
  24. commonground_api_common-2.3.0/vng_api_common/extensions/gegevensgroep.py +16 -0
  25. commonground_api_common-2.3.0/vng_api_common/extensions/geojson.py +270 -0
  26. commonground_api_common-2.3.0/vng_api_common/extensions/hyperlink.py +37 -0
  27. commonground_api_common-2.3.0/vng_api_common/extensions/polymorphic.py +68 -0
  28. commonground_api_common-2.3.0/vng_api_common/extensions/query.py +20 -0
  29. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/filters.py +0 -1
  30. commonground_api_common-2.3.0/vng_api_common/generators.py +37 -0
  31. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/api/views.py +3 -3
  32. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/oas.py +6 -7
  33. commonground_api_common-2.3.0/vng_api_common/schema.py +433 -0
  34. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/views.py +1 -1
  35. commonground_api_common-2.1.2/bin/generate_schema +0 -39
  36. commonground_api_common-2.1.2/bin/use_external_components +0 -16
  37. commonground_api_common-2.1.2/tests/test_content_type_headers.py +0 -84
  38. commonground_api_common-2.1.2/tests/test_schema_root_tags.py +0 -33
  39. commonground_api_common-2.1.2/vng_api_common/__init__.py +0 -1
  40. commonground_api_common-2.1.2/vng_api_common/conf/api.py +0 -112
  41. commonground_api_common-2.1.2/vng_api_common/generators.py +0 -138
  42. commonground_api_common-2.1.2/vng_api_common/inspectors/cache.py +0 -57
  43. commonground_api_common-2.1.2/vng_api_common/inspectors/fields.py +0 -126
  44. commonground_api_common-2.1.2/vng_api_common/inspectors/files.py +0 -121
  45. commonground_api_common-2.1.2/vng_api_common/inspectors/geojson.py +0 -360
  46. commonground_api_common-2.1.2/vng_api_common/inspectors/polymorphic.py +0 -72
  47. commonground_api_common-2.1.2/vng_api_common/inspectors/query.py +0 -91
  48. commonground_api_common-2.1.2/vng_api_common/inspectors/utils.py +0 -40
  49. commonground_api_common-2.1.2/vng_api_common/inspectors/view.py +0 -547
  50. commonground_api_common-2.1.2/vng_api_common/management/commands/generate_autorisaties.py +0 -43
  51. commonground_api_common-2.1.2/vng_api_common/management/commands/generate_notificaties.py +0 -40
  52. commonground_api_common-2.1.2/vng_api_common/management/commands/generate_swagger.py +0 -197
  53. commonground_api_common-2.1.2/vng_api_common/management/commands/patch_error_contenttypes.py +0 -61
  54. commonground_api_common-2.1.2/vng_api_common/management/commands/use_external_components.py +0 -94
  55. commonground_api_common-2.1.2/vng_api_common/schema.py +0 -177
  56. commonground_api_common-2.1.2/vng_api_common/templates/vng_api_common/api_schema_to_markdown_table.md +0 -16
  57. commonground_api_common-2.1.2/vng_api_common/templates/vng_api_common/autorisaties.md +0 -15
  58. commonground_api_common-2.1.2/vng_api_common/templates/vng_api_common/notificaties.md +0 -24
  59. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/MANIFEST.in +0 -0
  60. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/README.rst +0 -0
  61. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/commonground_api_common.egg-info/dependency_links.txt +0 -0
  62. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/commonground_api_common.egg-info/not-zip-safe +0 -0
  63. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/commonground_api_common.egg-info/top_level.txt +0 -0
  64. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/pyproject.toml +0 -0
  65. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/setup.py +0 -0
  66. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_autorisatie_validation.py +0 -0
  67. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_check_query_params.py +0 -0
  68. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_checks.py +0 -0
  69. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_choices.py +0 -0
  70. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_filters.py +0 -0
  71. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_gegevensgroepen.py +0 -0
  72. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_get_resource.py +0 -0
  73. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_jwt_decoding.py +0 -0
  74. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_jwtsecrets.py +0 -0
  75. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_migrations.py +0 -0
  76. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_nested_serializer_validation.py +0 -0
  77. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_pagination.py +0 -0
  78. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_permissions.py +0 -0
  79. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_publish_validators.py +0 -0
  80. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_server_errors.py +0 -0
  81. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_utils.py +0 -0
  82. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_validators.py +0 -0
  83. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/tests/test_views.py +0 -0
  84. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/admin.py +0 -0
  85. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/api/__init__.py +0 -0
  86. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/api/permissions.py +0 -0
  87. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/api/serializers.py +0 -0
  88. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/api/urls.py +0 -0
  89. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/__init__.py +0 -0
  90. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/admin.py +0 -0
  91. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/api/__init__.py +0 -0
  92. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/api/scopes.py +0 -0
  93. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/api/serializers.py +0 -0
  94. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/apps.py +0 -0
  95. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/audits.py +0 -0
  96. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0001_initial.py +0 -0
  97. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0002_auto_20190516_0830.py +0 -0
  98. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0003_auto_20190517_0844.py +0 -0
  99. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0004_auto_20190520_1238.py +0 -0
  100. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0005_auto_20190520_1450.py +0 -0
  101. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0006_audittrail_toelichting.py +0 -0
  102. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0007_auto_20190522_0916.py +0 -0
  103. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0008_audittrail_resource_weergave.py +0 -0
  104. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0009_auto_20190712_1643.py +0 -0
  105. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0010_audittrail_request_id.py +0 -0
  106. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0011_auto_20190918_1335.py +0 -0
  107. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0012_auto_20200619_0545.py +0 -0
  108. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0012_remove_audittrail_request_id.py +0 -0
  109. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0013_audittrail_logrecord_id.py +0 -0
  110. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0013_auto_20201207_0846.py +0 -0
  111. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0014_auto_20201221_0905.py +0 -0
  112. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0014_auto_20210323_1654.py +0 -0
  113. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0015_auto_20220318_1608.py +0 -0
  114. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0016_merge_20220607_0517.py +0 -0
  115. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0017_alter_audittrail_bron.py +0 -0
  116. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/0018_auto_20221212_0745.py +0 -0
  117. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/__init__.py +0 -0
  118. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/migrations/_operations.py +0 -0
  119. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/models.py +0 -0
  120. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/audittrails/viewsets.py +0 -0
  121. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/__init__.py +0 -0
  122. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/admin.py +0 -0
  123. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/middleware.py +0 -0
  124. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0001_initial.py +0 -0
  125. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0002_authorizationsconfig.py +0 -0
  126. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0003_auto_20190502_0409.py +0 -0
  127. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0004_auto_20190503_0941.py +0 -0
  128. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0005_auto_20190506_0842.py +0 -0
  129. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0006_auto_20190506_0901.py +0 -0
  130. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0007_auto_20190506_1212.py +0 -0
  131. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0008_auto_20190712_1541.py +0 -0
  132. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0009_update_enums.py +0 -0
  133. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0010_auto_20190712_1643.py +0 -0
  134. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0011_auto_20191114_0728.py +0 -0
  135. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0012_auto_20200619_0545.py +0 -0
  136. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0013_auto_20201207_0846.py +0 -0
  137. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0014_auto_20201221_0905.py +0 -0
  138. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0015_auto_20220318_1608.py +0 -0
  139. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/0016_remove_authorizationsconfig_api_root_and_more.py +0 -0
  140. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/migrations/__init__.py +0 -0
  141. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/models.py +0 -0
  142. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/serializers.py +0 -0
  143. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/utils.py +0 -0
  144. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/authorizations/validators.py +0 -0
  145. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/caching/__init__.py +0 -0
  146. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/caching/decorators.py +0 -0
  147. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/caching/etags.py +0 -0
  148. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/caching/introspection.py +0 -0
  149. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/caching/models.py +0 -0
  150. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/caching/registry.py +0 -0
  151. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/caching/signals.py +0 -0
  152. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/checks.py +0 -0
  153. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/choices.py +0 -0
  154. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/client.py +0 -0
  155. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/compat.py +0 -0
  156. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/conf/__init__.py +0 -0
  157. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/constants.py +0 -0
  158. {commonground_api_common-2.1.2/vng_api_common/db → commonground_api_common-2.3.0/vng_api_common/contrib}/__init__.py +0 -0
  159. {commonground_api_common-2.1.2/vng_api_common/inspectors → commonground_api_common-2.3.0/vng_api_common/contrib/setup_configuration}/__init__.py +0 -0
  160. {commonground_api_common-2.1.2/vng_api_common/management → commonground_api_common-2.3.0/vng_api_common/db}/__init__.py +0 -0
  161. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/db/operations.py +0 -0
  162. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/decorators.py +0 -0
  163. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/descriptors.py +0 -0
  164. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/doc.py +0 -0
  165. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/exception_handling.py +0 -0
  166. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/exceptions.py +0 -0
  167. {commonground_api_common-2.1.2/vng_api_common/management/commands → commonground_api_common-2.3.0/vng_api_common/extensions}/__init__.py +0 -0
  168. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/fields.py +0 -0
  169. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/filtersets.py +0 -0
  170. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/geo.py +0 -0
  171. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/locale/nl/LC_MESSAGES/django.mo +0 -0
  172. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/locale/nl/LC_MESSAGES/django.po +0 -0
  173. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/middleware.py +0 -0
  174. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/migrations/0001_initial.py +0 -0
  175. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/migrations/0002_apicredential.py +0 -0
  176. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/migrations/0003_auto_20190417_1145.py +0 -0
  177. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/migrations/0004_auto_20190517_0903.py +0 -0
  178. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/migrations/0005_auto_20190614_1346.py +0 -0
  179. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/migrations/0006_delete_apicredential.py +0 -0
  180. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/migrations/__init__.py +0 -0
  181. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/mocks.py +0 -0
  182. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/models.py +0 -0
  183. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/__init__.py +0 -0
  184. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/api/__init__.py +0 -0
  185. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/api/urls.py +0 -0
  186. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/apps.py +0 -0
  187. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/handlers.py +0 -0
  188. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0001_initial.py +0 -0
  189. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0002_subscription__subscription.py +0 -0
  190. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0003_auto_20190319_1048.py +0 -0
  191. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0004_auto_20190325_1313.py +0 -0
  192. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0005_fix_default_nrc.py +0 -0
  193. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0006_auto_20190417_1142.py +0 -0
  194. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0007_auto_20190429_1442.py +0 -0
  195. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0008_auto_20190502_0415.py +0 -0
  196. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0009_auto_20190729_0427.py +0 -0
  197. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0010_auto_20220704_1419.py +0 -0
  198. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/0011_remove_subscription_config_and_more.py +0 -0
  199. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/notifications/migrations/__init__.py +0 -0
  200. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/pagination.py +0 -0
  201. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/permissions.py +0 -0
  202. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/polymorphism.py +0 -0
  203. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/routers.py +0 -0
  204. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/scopes.py +0 -0
  205. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/search.py +0 -0
  206. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/serializers.py +0 -0
  207. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/css/admin/admin_overrides.css +0 -0
  208. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/css/screen.css +0 -0
  209. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/ico/favicon.png +0 -0
  210. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/img/vng.svg +0 -0
  211. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/LICENSE.txt +0 -0
  212. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.css +0 -0
  213. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/css/all.min.css +0 -0
  214. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.eot +0 -0
  215. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.svg +0 -0
  216. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.ttf +0 -0
  217. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff +0 -0
  218. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
  219. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.eot +0 -0
  220. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.svg +0 -0
  221. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.ttf +0 -0
  222. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff +0 -0
  223. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
  224. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.eot +0 -0
  225. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.svg +0 -0
  226. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  227. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff +0 -0
  228. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  229. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templates/vng_api_common/admin/base_site.html +0 -0
  230. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templates/vng_api_common/includes/kanalen_card.html +0 -0
  231. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templates/vng_api_common/index.html +0 -0
  232. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templates/vng_api_common/master.html +0 -0
  233. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templates/vng_api_common/ref/error_detail.html +0 -0
  234. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templates/vng_api_common/ref/scopes.html +0 -0
  235. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templates/vng_api_common/view_config.html +0 -0
  236. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templatetags/__init__.py +0 -0
  237. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/templatetags/vng_api_common.py +0 -0
  238. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/tests/__init__.py +0 -0
  239. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/tests/auth.py +0 -0
  240. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/tests/caching.py +0 -0
  241. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/tests/schema.py +0 -0
  242. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/tests/urls.py +0 -0
  243. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/urls.py +0 -0
  244. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/utils.py +0 -0
  245. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/validators.py +0 -0
  246. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/version.py +0 -0
  247. {commonground_api_common-2.1.2 → commonground_api_common-2.3.0}/vng_api_common/viewsets.py +0 -0
@@ -2,6 +2,21 @@
2
2
  Change history
3
3
  ==============
4
4
 
5
+ 2.3.0 (2025-01-09)
6
+ ------------------
7
+
8
+ * Add ConfigurationStep for Applicatie model
9
+ * [#29] Replaced drf-yasg with drf-spectacular
10
+ * [#29] Removed management commands to generate markdown files for scopes and notifications channels:
11
+ * ``generate_autorisaties``
12
+ * ``generate_notificaties``
13
+
14
+
15
+ 2.2.0 (2024-12-10)
16
+ ------------------
17
+
18
+ * Add support for ``django-setup-configuration``, add a ``ConfigurationStep`` for ``JWTSecret``
19
+
5
20
  2.1.2 (2024-11-29)
6
21
  ------------------
7
22
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: commonground-api-common
3
- Version: 2.1.2
3
+ Version: 2.3.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
@@ -25,8 +25,8 @@ Requires-Dist: django-solo
25
25
  Requires-Dist: djangorestframework>=3.15.0
26
26
  Requires-Dist: djangorestframework_camel_case>=1.2.0
27
27
  Requires-Dist: django-rest-framework-condition
28
- Requires-Dist: drf-yasg>=1.20.0
29
28
  Requires-Dist: drf-nested-routers>=0.94.1
29
+ Requires-Dist: drf-spectacular
30
30
  Requires-Dist: iso-639
31
31
  Requires-Dist: isodate
32
32
  Requires-Dist: notifications-api-common>=0.3.1
@@ -40,10 +40,15 @@ Requires-Dist: ape-pie
40
40
  Provides-Extra: markdown-docs
41
41
  Requires-Dist: django-markup<=1.3; extra == "markdown-docs"
42
42
  Requires-Dist: markdown; extra == "markdown-docs"
43
+ Provides-Extra: djangorestframework-gis
44
+ Requires-Dist: djangorestframework-gis>=1.0; extra == "djangorestframework-gis"
45
+ Provides-Extra: drf-extra-fields
46
+ Requires-Dist: drf-extra-fields>=3.7.0; extra == "drf-extra-fields"
43
47
  Provides-Extra: tests
44
48
  Requires-Dist: psycopg2; extra == "tests"
45
49
  Requires-Dist: pytest; extra == "tests"
46
50
  Requires-Dist: pytest-django; extra == "tests"
51
+ Requires-Dist: pytest-dotenv; extra == "tests"
47
52
  Requires-Dist: pytest-factoryboy; extra == "tests"
48
53
  Requires-Dist: tox; extra == "tests"
49
54
  Requires-Dist: isort; extra == "tests"
@@ -51,8 +56,12 @@ Requires-Dist: black; extra == "tests"
51
56
  Requires-Dist: requests-mock; extra == "tests"
52
57
  Requires-Dist: freezegun; extra == "tests"
53
58
  Requires-Dist: zgw-consumers-oas; extra == "tests"
59
+ Requires-Dist: djangorestframework-gis; extra == "tests"
60
+ Requires-Dist: drf-extra-fields; extra == "tests"
54
61
  Provides-Extra: testutils
55
62
  Requires-Dist: zgw-consumers-oas; extra == "testutils"
63
+ Provides-Extra: setup-configuration
64
+ Requires-Dist: django-setup-configuration>=0.4.0; extra == "setup-configuration"
56
65
  Provides-Extra: pep8
57
66
  Requires-Dist: flake8; extra == "pep8"
58
67
  Provides-Extra: coverage
@@ -9,7 +9,5 @@ if [[ -z "$VIRTUAL_ENV" ]]; then
9
9
  exit 1
10
10
  fi
11
11
 
12
- source_file=${1:-./src/openapi.yaml}
13
- manage=${MANAGE:-src/manage.py}
14
-
15
- python $manage patch_error_contenttypes $source_file
12
+ echo "generate schema"
13
+ src/manage.py spectacular --file src/openapi.yaml --validate
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: commonground-api-common
3
- Version: 2.1.2
3
+ Version: 2.3.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
@@ -25,8 +25,8 @@ Requires-Dist: django-solo
25
25
  Requires-Dist: djangorestframework>=3.15.0
26
26
  Requires-Dist: djangorestframework_camel_case>=1.2.0
27
27
  Requires-Dist: django-rest-framework-condition
28
- Requires-Dist: drf-yasg>=1.20.0
29
28
  Requires-Dist: drf-nested-routers>=0.94.1
29
+ Requires-Dist: drf-spectacular
30
30
  Requires-Dist: iso-639
31
31
  Requires-Dist: isodate
32
32
  Requires-Dist: notifications-api-common>=0.3.1
@@ -40,10 +40,15 @@ Requires-Dist: ape-pie
40
40
  Provides-Extra: markdown-docs
41
41
  Requires-Dist: django-markup<=1.3; extra == "markdown-docs"
42
42
  Requires-Dist: markdown; extra == "markdown-docs"
43
+ Provides-Extra: djangorestframework-gis
44
+ Requires-Dist: djangorestframework-gis>=1.0; extra == "djangorestframework-gis"
45
+ Provides-Extra: drf-extra-fields
46
+ Requires-Dist: drf-extra-fields>=3.7.0; extra == "drf-extra-fields"
43
47
  Provides-Extra: tests
44
48
  Requires-Dist: psycopg2; extra == "tests"
45
49
  Requires-Dist: pytest; extra == "tests"
46
50
  Requires-Dist: pytest-django; extra == "tests"
51
+ Requires-Dist: pytest-dotenv; extra == "tests"
47
52
  Requires-Dist: pytest-factoryboy; extra == "tests"
48
53
  Requires-Dist: tox; extra == "tests"
49
54
  Requires-Dist: isort; extra == "tests"
@@ -51,8 +56,12 @@ Requires-Dist: black; extra == "tests"
51
56
  Requires-Dist: requests-mock; extra == "tests"
52
57
  Requires-Dist: freezegun; extra == "tests"
53
58
  Requires-Dist: zgw-consumers-oas; extra == "tests"
59
+ Requires-Dist: djangorestframework-gis; extra == "tests"
60
+ Requires-Dist: drf-extra-fields; extra == "tests"
54
61
  Provides-Extra: testutils
55
62
  Requires-Dist: zgw-consumers-oas; extra == "testutils"
63
+ Provides-Extra: setup-configuration
64
+ Requires-Dist: django-setup-configuration>=0.4.0; extra == "setup-configuration"
56
65
  Provides-Extra: pep8
57
66
  Requires-Dist: flake8; extra == "pep8"
58
67
  Provides-Extra: coverage
@@ -5,8 +5,6 @@ pyproject.toml
5
5
  setup.cfg
6
6
  setup.py
7
7
  bin/generate_schema
8
- bin/patch_content_types
9
- bin/use_external_components
10
8
  commonground_api_common.egg-info/PKG-INFO
11
9
  commonground_api_common.egg-info/SOURCES.txt
12
10
  commonground_api_common.egg-info/dependency_links.txt
@@ -18,7 +16,11 @@ tests/test_cache_headers.py
18
16
  tests/test_check_query_params.py
19
17
  tests/test_checks.py
20
18
  tests/test_choices.py
19
+ tests/test_configuration_steps_applicaties.py
20
+ tests/test_configuration_steps_jwtsecrets.py
21
21
  tests/test_content_type_headers.py
22
+ tests/test_field_extensions.py
23
+ tests/test_filter_extension.py
22
24
  tests/test_filters.py
23
25
  tests/test_gegevensgroepen.py
24
26
  tests/test_get_resource.py
@@ -29,7 +31,8 @@ tests/test_nested_serializer_validation.py
29
31
  tests/test_pagination.py
30
32
  tests/test_permissions.py
31
33
  tests/test_publish_validators.py
32
- tests/test_schema_root_tags.py
34
+ tests/test_schema.py
35
+ tests/test_serializer_extensions.py
33
36
  tests/test_server_errors.py
34
37
  tests/test_utils.py
35
38
  tests/test_validators.py
@@ -80,6 +83,7 @@ vng_api_common/audittrails/admin.py
80
83
  vng_api_common/audittrails/apps.py
81
84
  vng_api_common/audittrails/audits.py
82
85
  vng_api_common/audittrails/models.py
86
+ vng_api_common/audittrails/utils.py
83
87
  vng_api_common/audittrails/viewsets.py
84
88
  vng_api_common/audittrails/api/__init__.py
85
89
  vng_api_common/audittrails/api/scopes.py
@@ -140,26 +144,21 @@ vng_api_common/caching/registry.py
140
144
  vng_api_common/caching/signals.py
141
145
  vng_api_common/conf/__init__.py
142
146
  vng_api_common/conf/api.py
147
+ vng_api_common/contrib/__init__.py
148
+ vng_api_common/contrib/setup_configuration/__init__.py
149
+ vng_api_common/contrib/setup_configuration/models.py
150
+ vng_api_common/contrib/setup_configuration/steps.py
143
151
  vng_api_common/db/__init__.py
144
152
  vng_api_common/db/operations.py
145
- vng_api_common/inspectors/__init__.py
146
- vng_api_common/inspectors/cache.py
147
- vng_api_common/inspectors/fields.py
148
- vng_api_common/inspectors/files.py
149
- vng_api_common/inspectors/geojson.py
150
- vng_api_common/inspectors/polymorphic.py
151
- vng_api_common/inspectors/query.py
152
- vng_api_common/inspectors/utils.py
153
- vng_api_common/inspectors/view.py
153
+ vng_api_common/extensions/__init__.py
154
+ vng_api_common/extensions/file.py
155
+ vng_api_common/extensions/gegevensgroep.py
156
+ vng_api_common/extensions/geojson.py
157
+ vng_api_common/extensions/hyperlink.py
158
+ vng_api_common/extensions/polymorphic.py
159
+ vng_api_common/extensions/query.py
154
160
  vng_api_common/locale/nl/LC_MESSAGES/django.mo
155
161
  vng_api_common/locale/nl/LC_MESSAGES/django.po
156
- vng_api_common/management/__init__.py
157
- vng_api_common/management/commands/__init__.py
158
- vng_api_common/management/commands/generate_autorisaties.py
159
- vng_api_common/management/commands/generate_notificaties.py
160
- vng_api_common/management/commands/generate_swagger.py
161
- vng_api_common/management/commands/patch_error_contenttypes.py
162
- vng_api_common/management/commands/use_external_components.py
163
162
  vng_api_common/migrations/0001_initial.py
164
163
  vng_api_common/migrations/0002_apicredential.py
165
164
  vng_api_common/migrations/0003_auto_20190417_1145.py
@@ -207,11 +206,8 @@ vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.svg
207
206
  vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.ttf
208
207
  vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff
209
208
  vng_api_common/static/vng_api_common/libs/fontawesome/webfonts/fa-solid-900.woff2
210
- vng_api_common/templates/vng_api_common/api_schema_to_markdown_table.md
211
- vng_api_common/templates/vng_api_common/autorisaties.md
212
209
  vng_api_common/templates/vng_api_common/index.html
213
210
  vng_api_common/templates/vng_api_common/master.html
214
- vng_api_common/templates/vng_api_common/notificaties.md
215
211
  vng_api_common/templates/vng_api_common/view_config.html
216
212
  vng_api_common/templates/vng_api_common/admin/base_site.html
217
213
  vng_api_common/templates/vng_api_common/includes/kanalen_card.html
@@ -4,8 +4,8 @@ django-solo
4
4
  djangorestframework>=3.15.0
5
5
  djangorestframework_camel_case>=1.2.0
6
6
  django-rest-framework-condition
7
- drf-yasg>=1.20.0
8
7
  drf-nested-routers>=0.94.1
8
+ drf-spectacular
9
9
  iso-639
10
10
  isodate
11
11
  notifications-api-common>=0.3.1
@@ -20,11 +20,17 @@ ape-pie
20
20
  [coverage]
21
21
  pytest-cov
22
22
 
23
+ [djangorestframework_gis]
24
+ djangorestframework-gis>=1.0
25
+
23
26
  [docs]
24
27
  psycopg2
25
28
  sphinx
26
29
  sphinx-rtd-theme
27
30
 
31
+ [drf_extra_fields]
32
+ drf-extra-fields>=3.7.0
33
+
28
34
  [markdown_docs]
29
35
  django-markup<=1.3
30
36
  markdown
@@ -35,10 +41,14 @@ flake8
35
41
  [release]
36
42
  bump2version
37
43
 
44
+ [setup-configuration]
45
+ django-setup-configuration>=0.4.0
46
+
38
47
  [tests]
39
48
  psycopg2
40
49
  pytest
41
50
  pytest-django
51
+ pytest-dotenv
42
52
  pytest-factoryboy
43
53
  tox
44
54
  isort
@@ -46,6 +56,8 @@ black
46
56
  requests-mock
47
57
  freezegun
48
58
  zgw-consumers-oas
59
+ djangorestframework-gis
60
+ drf-extra-fields
49
61
 
50
62
  [testutils]
51
63
  zgw-consumers-oas
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = commonground-api-common
3
- version = 2.1.2
3
+ version = 2.3.0
4
4
  description = Commonground API tooling
5
5
  long_description = file: README.rst
6
6
  url = https://github.com/maykinmedia/commonground-api-common
@@ -28,8 +28,6 @@ include_package_data = True
28
28
  packages = find:
29
29
  scripts =
30
30
  bin/generate_schema
31
- bin/patch_content_types
32
- bin/use_external_components
33
31
  install_requires =
34
32
  django>=4.2.0
35
33
  django-filter>=23.1,<=25.1
@@ -37,8 +35,8 @@ install_requires =
37
35
  djangorestframework>=3.15.0
38
36
  djangorestframework_camel_case>=1.2.0
39
37
  django-rest-framework-condition
40
- drf-yasg>=1.20.0 # TODO: remove usage?
41
38
  drf-nested-routers>=0.94.1
39
+ drf-spectacular
42
40
  iso-639
43
41
  isodate
44
42
  notifications-api-common>=0.3.1
@@ -52,6 +50,7 @@ install_requires =
52
50
  tests_require =
53
51
  pytest
54
52
  pytest-django
53
+ pytest-dotenv
55
54
  pytest-factoryboy
56
55
  tox
57
56
  isort
@@ -68,10 +67,15 @@ include =
68
67
  markdown_docs =
69
68
  django-markup<=1.3
70
69
  markdown
70
+ djangorestframework_gis =
71
+ djangorestframework-gis>=1.0
72
+ drf_extra_fields =
73
+ drf-extra-fields>=3.7.0
71
74
  tests =
72
75
  psycopg2
73
76
  pytest
74
77
  pytest-django
78
+ pytest-dotenv
75
79
  pytest-factoryboy
76
80
  tox
77
81
  isort
@@ -79,8 +83,12 @@ tests =
79
83
  requests-mock
80
84
  freezegun
81
85
  zgw-consumers-oas
86
+ djangorestframework-gis
87
+ drf-extra-fields
82
88
  testutils =
83
89
  zgw-consumers-oas
90
+ setup-configuration =
91
+ django-setup-configuration>=0.4.0
84
92
  pep8 = flake8
85
93
  coverage = pytest-cov
86
94
  docs =
@@ -1,21 +1,18 @@
1
1
  from unittest.mock import patch
2
2
 
3
3
  from django.db import transaction
4
+ from django.urls import path
4
5
 
5
6
  import pytest
6
- from drf_yasg import openapi
7
- from drf_yasg.generators import SchemaGenerator
8
7
  from rest_framework import status, viewsets
9
8
  from rest_framework.reverse import reverse
10
- from rest_framework.test import APIRequestFactory
11
- from rest_framework.views import APIView
12
9
 
13
10
  from testapp.factories import GroupFactory, HobbyFactory, PersonFactory
14
11
  from testapp.models import Hobby, Person
15
12
  from testapp.serializers import HobbySerializer
16
13
  from testapp.viewsets import PersonViewSet
14
+ from tests import generate_schema
17
15
  from vng_api_common.caching.decorators import conditional_retrieve
18
- from vng_api_common.inspectors.cache import get_cache_headers
19
16
 
20
17
  pytestmark = pytest.mark.django_db(transaction=True)
21
18
 
@@ -51,17 +48,20 @@ def test_200_on_stale_resource(api_client, person):
51
48
 
52
49
 
53
50
  def test_cache_headers_detected():
54
- request = APIRequestFactory().get("/api/persons/1")
55
- request = APIView().initialize_request(request)
56
- callback = PersonViewSet.as_view({"get": "retrieve"}, detail=True)
57
- generator = SchemaGenerator()
58
-
59
- view = generator.create_view(callback, "GET", request=request)
51
+ urlpatterns = [
52
+ path(
53
+ "person/<int:pk>/",
54
+ PersonViewSet.as_view({"get": "retrieve"}, detail=True),
55
+ name="person-detail",
56
+ ),
57
+ ]
60
58
 
61
- headers = get_cache_headers(view)
59
+ schema = generate_schema(urlpatterns)
62
60
 
63
- assert "ETag" in headers
64
- assert isinstance(headers["ETag"], openapi.Schema)
61
+ parameters = schema["paths"]["/person/{id}/"]["get"]["parameters"]
62
+ headers = [param for param in parameters if param["in"] == "header"]
63
+ assert len(headers) == 1
64
+ assert headers[0]["name"] == "If-None-Match"
65
65
 
66
66
 
67
67
  @pytest.mark.django_db(transaction=False)
@@ -0,0 +1,82 @@
1
+ import pytest
2
+ from django_setup_configuration.test_utils import execute_single_step
3
+
4
+ from vng_api_common.authorizations.models import Applicatie
5
+ from vng_api_common.contrib.setup_configuration.steps import ApplicatieConfigurationStep
6
+
7
+ CONFIG_FILE_PATH = "tests/files/setup_config_applicaties.yaml"
8
+
9
+
10
+ @pytest.mark.django_db
11
+ def test_execute_configuration_step_success():
12
+ execute_single_step(ApplicatieConfigurationStep, yaml_source=CONFIG_FILE_PATH)
13
+
14
+ assert Applicatie.objects.count() == 2
15
+
16
+ applicatie1, applicatie2 = Applicatie.objects.all()
17
+
18
+ assert str(applicatie1.uuid) == "78591bab-9a00-4887-849c-53b21a67782f"
19
+ assert applicatie1.client_ids == ["user-id", "user-id2"]
20
+ assert applicatie1.label == "applicatie1"
21
+ assert applicatie1.heeft_alle_autorisaties is True
22
+
23
+ assert str(applicatie2.uuid) == "fa0f6d18-5900-4d74-aad4-a748afb2c505"
24
+ assert applicatie2.client_ids == ["user-id2"]
25
+ assert applicatie2.label == "applicatie2"
26
+ assert applicatie2.heeft_alle_autorisaties is True
27
+
28
+
29
+ @pytest.mark.django_db
30
+ def test_execute_configuration_step_update_existing():
31
+ Applicatie.objects.create(
32
+ uuid="78591bab-9a00-4887-849c-53b21a67782f",
33
+ client_ids=["old-user-id"],
34
+ label="old applicatie1",
35
+ )
36
+ Applicatie.objects.create(
37
+ uuid="fa0f6d18-5900-4d74-aad4-a748afb2c505",
38
+ client_ids=["old-user-id2"],
39
+ label="old applicatie2",
40
+ )
41
+
42
+ execute_single_step(ApplicatieConfigurationStep, yaml_source=CONFIG_FILE_PATH)
43
+
44
+ assert Applicatie.objects.count() == 2
45
+
46
+ applicatie1, applicatie2 = Applicatie.objects.all()
47
+
48
+ assert str(applicatie1.uuid) == "78591bab-9a00-4887-849c-53b21a67782f"
49
+ assert applicatie1.client_ids == ["user-id", "user-id2"]
50
+ assert applicatie1.label == "applicatie1"
51
+ assert applicatie1.heeft_alle_autorisaties is True
52
+
53
+ assert str(applicatie2.uuid) == "fa0f6d18-5900-4d74-aad4-a748afb2c505"
54
+ assert applicatie2.client_ids == ["user-id2"]
55
+ assert applicatie2.label == "applicatie2"
56
+ assert applicatie2.heeft_alle_autorisaties is True
57
+
58
+
59
+ @pytest.mark.django_db
60
+ def test_execute_configuration_step_idempotent():
61
+ def make_assertions():
62
+ assert Applicatie.objects.count() == 2
63
+
64
+ applicatie1, applicatie2 = Applicatie.objects.all()
65
+
66
+ assert str(applicatie1.uuid) == "78591bab-9a00-4887-849c-53b21a67782f"
67
+ assert applicatie1.client_ids == ["user-id", "user-id2"]
68
+ assert applicatie1.label == "applicatie1"
69
+ assert applicatie1.heeft_alle_autorisaties is True
70
+
71
+ assert str(applicatie2.uuid) == "fa0f6d18-5900-4d74-aad4-a748afb2c505"
72
+ assert applicatie2.client_ids == ["user-id2"]
73
+ assert applicatie2.label == "applicatie2"
74
+ assert applicatie2.heeft_alle_autorisaties is True
75
+
76
+ execute_single_step(ApplicatieConfigurationStep, yaml_source=CONFIG_FILE_PATH)
77
+
78
+ make_assertions()
79
+
80
+ execute_single_step(ApplicatieConfigurationStep, yaml_source=CONFIG_FILE_PATH)
81
+
82
+ make_assertions()
@@ -0,0 +1,62 @@
1
+ import pytest
2
+ from django_setup_configuration.test_utils import execute_single_step
3
+
4
+ from vng_api_common.contrib.setup_configuration.steps import JWTSecretsConfigurationStep
5
+ from vng_api_common.models import JWTSecret
6
+
7
+ CONFIG_FILE_PATH = "tests/files/setup_config_jwtsecrets.yaml"
8
+
9
+
10
+ @pytest.mark.django_db
11
+ def test_execute_configuration_step_success():
12
+ execute_single_step(JWTSecretsConfigurationStep, yaml_source=CONFIG_FILE_PATH)
13
+
14
+ assert JWTSecret.objects.count() == 2
15
+
16
+ credential1, credential2 = JWTSecret.objects.all()
17
+
18
+ assert credential1.identifier == "user-id"
19
+ assert credential1.secret == "super-secret"
20
+
21
+ assert credential2.identifier == "user-id2"
22
+ assert credential2.secret == "super-secret2"
23
+
24
+
25
+ @pytest.mark.django_db
26
+ def test_execute_configuration_step_update_existing():
27
+ JWTSecret.objects.create(identifier="user-id", secret="old")
28
+ JWTSecret.objects.create(identifier="user-id2", secret="old2")
29
+
30
+ execute_single_step(JWTSecretsConfigurationStep, yaml_source=CONFIG_FILE_PATH)
31
+
32
+ assert JWTSecret.objects.count() == 2
33
+
34
+ credential1, credential2 = JWTSecret.objects.all()
35
+
36
+ assert credential1.identifier == "user-id"
37
+ assert credential1.secret == "super-secret"
38
+
39
+ assert credential2.identifier == "user-id2"
40
+ assert credential2.secret == "super-secret2"
41
+
42
+
43
+ @pytest.mark.django_db
44
+ def test_execute_configuration_step_idempotent():
45
+ def make_assertions():
46
+ assert JWTSecret.objects.count() == 2
47
+
48
+ credential1, credential2 = JWTSecret.objects.all()
49
+
50
+ assert credential1.identifier == "user-id"
51
+ assert credential1.secret == "super-secret"
52
+
53
+ assert credential2.identifier == "user-id2"
54
+ assert credential2.secret == "super-secret2"
55
+
56
+ execute_single_step(JWTSecretsConfigurationStep, yaml_source=CONFIG_FILE_PATH)
57
+
58
+ make_assertions()
59
+
60
+ execute_single_step(JWTSecretsConfigurationStep, yaml_source=CONFIG_FILE_PATH)
61
+
62
+ make_assertions()
@@ -0,0 +1,76 @@
1
+ """
2
+ Test that the required content type headers are present.
3
+ """
4
+
5
+ from django.urls import path
6
+
7
+ from rest_framework.parsers import JSONParser, MultiPartParser
8
+ from rest_framework.renderers import JSONRenderer
9
+ from rest_framework.response import Response
10
+ from rest_framework.views import APIView
11
+
12
+ from tests import generate_schema
13
+
14
+
15
+ class DummyView(APIView):
16
+ renderer_classes = (JSONRenderer,)
17
+
18
+ def get(self, request):
19
+ return Response({})
20
+
21
+ def post(self, request):
22
+ return Response({})
23
+
24
+
25
+ class JSONView(DummyView):
26
+ parser_classes = (JSONParser,)
27
+
28
+
29
+ class MultiPartView(DummyView):
30
+ parser_classes = (MultiPartParser,)
31
+
32
+
33
+ urlpatterns = [
34
+ path("json", JSONView.as_view(), name="json"),
35
+ path("multipart", MultiPartView.as_view(), name="multipart"),
36
+ ]
37
+
38
+
39
+ def _generate_schema():
40
+ return generate_schema(urlpatterns)
41
+
42
+
43
+ def test_json_content_type():
44
+ schema = _generate_schema()
45
+
46
+ get_operation = schema["paths"]["/json"]["get"]
47
+ post_operation = schema["paths"]["/json"]["post"]
48
+
49
+ assert get_operation.get("parameters", []) == []
50
+ assert post_operation["parameters"] == [
51
+ {
52
+ "description": "Content type of the request body.",
53
+ "in": "header",
54
+ "name": "Content-Type",
55
+ "required": True,
56
+ "schema": {"enum": ["application/json"], "type": "string"},
57
+ }
58
+ ]
59
+
60
+
61
+ def test_multipart_content_type():
62
+ schema = _generate_schema()
63
+
64
+ get_operation = schema["paths"]["/multipart"]["get"]
65
+ post_operation = schema["paths"]["/multipart"]["post"]
66
+
67
+ assert get_operation.get("parameters", []) == []
68
+ assert post_operation["parameters"] == [
69
+ {
70
+ "in": "header",
71
+ "name": "Content-Type",
72
+ "schema": {"type": "string", "enum": ["multipart/form-data"]},
73
+ "description": "Content type of the request body.",
74
+ "required": True,
75
+ }
76
+ ]