پرش به محتویات

schema

افزونه‌های drf-spectacular، که وقتی drf-spectacular نصب است بار می‌شوند. خود drf-spectacular پیدایشان می‌کند؛ هیچ چیزی اینجا را پروژه صدا نمی‌زند.

The library in a drf-spectacular schema - loaded only when drf-spectacular is installed.

Without it, spectacular warns that it cannot resolve the library's classes and leaves every endpoint without a word about how it is signed in to. With it:

  • CookieAuthentication is an apiKey in the access cookie, under the name the project chose;
  • HeaderAuthentication is simplejwt's bearer scheme, jwtAuth, so a project that lists simplejwt's own class too sees one scheme, not two;
  • OptionalAuthentication is either of the two, or nobody;
  • the refresh, sign-out and CSRF-token views say what they read and answer, including that a browser is never handed a token in a body.

Nothing to install beyond the package's extra:

pip install "django-httponly-jwt[spectacular]"