-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zgw-consumers refactor #38
Conversation
Also tackles #7 |
notifications-api-common has changed its underlying client to ape_pie.APIClient due to a zgw-consumers update (maykinmedia/notifications-api-common#15)
To make them match with notifications-api-common>=0.3.0
This can be useful for Openzaak instances where these paths are used
These definitions are included in `notifications-api-common`
AuthorizationsConfig model Removed models should be imported from notifications-api-common
AuthorizationsConfig
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
==========================================
+ Coverage 54.95% 55.51% +0.55%
==========================================
Files 79 80 +1
Lines 3632 3599 -33
Branches 590 470 -120
==========================================
+ Hits 1996 1998 +2
+ Misses 1533 1499 -34
+ Partials 103 102 -1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
23015e8
to
f3fe4ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github won't let me approve (because I'm the owner of the PR), but this looks good 👍
return auth | ||
|
||
|
||
class ClientConfig(SingletonModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this abstract model deleted? I'm pretty sure it's used in Open Zaak. Maybe just change api_root to be a FK to Service
model instead of the url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've replaced the usage of it in Open Zaak with a regular SingletonModel with a service, it feels a bit unnecessary to have an abstract model that only contains a FK to Service imo
blank=True, | ||
null=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think it should not be nullable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a migration to remove null=True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm upon second thought, this does make calling .get_solo()
problematic (in tests for example), because you cannot add a default value for this, so we might have to keep it nullable :/
Used for the ResourceValidator, which verifies if objects have the correct shape as defined in an OAS.
@stevenbal I added 44a4032 today, as I noticed the configuration view was broken (incorrectly stated services were reachable) by the changes made in this PR. They were not picked up by the tests though, so I also added/updated some tests. |
6bd8cfe
to
5d331a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Handle duplicate service slugs
this checked for vng_api_common.notifications, but should check notifications_api_common since the notifications code moved there
Fixes #7
Partially fixes maykinmedia/open-api-framework#66
Upgrading zgw-consumers to ensure we can upgrade zgw consumers in Open Zaak: open-zaak/open-zaak#1800