Repository navigation
providers/oauth2: override RedirectURITypeEnum capitalization for generated API - #22037
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| .options=${logoutMethodOptions} | ||
| .help=${msg( | ||
| "The logout method determines how the logout URI is called — back-channel (server-to-server) or front-channel (browser iframe).", | ||
| "The logout method determines how the logout URI is called — back-channel (server-to-server) or front-channel (browser iframe).", |
There was a problem hiding this comment.
I don't think this change was intended?
There was a problem hiding this comment.
you're right, that wasn't intended. The regeneration process introduced a UTF-8 BOM in several files and corrupted a character in OAuth2ProviderFormForm.ts. Fixed in the latest commit, only the enum rename changes remain.
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22037 +/- ##
==========================================
- Coverage 93.13% 93.13% -0.01%
==========================================
Files 1024 1024
Lines 59251 59278 +27
Branches 400 400
==========================================
+ Hits 55186 55211 +25
- Misses 4065 4067 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Details
Fixes #21469.
RedirectURITypewas exposed in the API schema asRedirectUriTypeEnum(lowercaseuri) instead ofRedirectURITypeEnum, inconsistent with all other IAM-related enums in this codebase (SAMLNameIDPolicyEnum,SCIMAuthenticationModeEnum,LDAPAPIAccessMode).The root cause is that
drf-spectacular'spostprocess_schema_enumsusesinflection.camelize()which does not preserve acronyms. The established fix pattern in Authentik isENUM_NAME_OVERRIDESinsettings.py, already used for SAML, SCIM and LDAP enums.Changes:
RedirectURITypeEnumtoENUM_NAME_OVERRIDESinsettings.pyschema.ymland regenerated the TypeScript client accordinglyChecklist
ak test authentik/)make lint-fix)If an API change has been made
make gen)If changes to the frontend have been made
make web)If applicable
make docs)