[PR #2313] [MERGED] Fixed some warnings reported by drf-speculator #2516

Closed
opened 2026-02-27 12:11:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/modoboa/modoboa/pull/2313
Author: @jeromelebleu
Created: 7/5/2021
Status: Merged
Merged: 7/8/2021
Merged by: @tonioo

Base: masterHead: fix-drf-speculator


📝 Commits (1)

  • 0793905 Fixed warnings reported by drf-speculator

📊 Changes

4 files changed (+9 additions, -0 deletions)

View changed files

📝 modoboa/admin/api/v2/viewsets.py (+1 -0)
📝 modoboa/core/api/v1/viewsets.py (+1 -0)
📝 modoboa/core/drf_authentication.py (+6 -0)
📝 modoboa/parameters/api/v2/viewsets.py (+1 -0)

📄 Description

This fixes the following error and warnings reported by drf-speculator:

Error #0: AccountViewSet: unable to guess serializer. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. Ignoring view for now.
Warning #1: AccountViewSet: could not resolve authenticator <class 'modoboa.core.drf_authentication.JWTAuthenticationWith2FA'>. There was no OpenApiAuthenticationExtension registered for that class. Try creating one by subclassing it. Ignoring for now.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/modoboa/modoboa/pull/2313 **Author:** [@jeromelebleu](https://github.com/jeromelebleu) **Created:** 7/5/2021 **Status:** ✅ Merged **Merged:** 7/8/2021 **Merged by:** [@tonioo](https://github.com/tonioo) **Base:** `master` ← **Head:** `fix-drf-speculator` --- ### 📝 Commits (1) - [`0793905`](https://github.com/modoboa/modoboa/commit/0793905e78ed302e8af9735fe444d8ed22fe8ee0) Fixed warnings reported by drf-speculator ### 📊 Changes **4 files changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `modoboa/admin/api/v2/viewsets.py` (+1 -0) 📝 `modoboa/core/api/v1/viewsets.py` (+1 -0) 📝 `modoboa/core/drf_authentication.py` (+6 -0) 📝 `modoboa/parameters/api/v2/viewsets.py` (+1 -0) </details> ### 📄 Description This fixes the following error and warnings reported by drf-speculator: ``` Error #0: AccountViewSet: unable to guess serializer. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. Ignoring view for now. Warning #1: AccountViewSet: could not resolve authenticator <class 'modoboa.core.drf_authentication.JWTAuthenticationWith2FA'>. There was no OpenApiAuthenticationExtension registered for that class. Try creating one by subclassing it. Ignoring for now. ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 12:11:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#2516
No description provided.