Skip to content

SchemaGenerator doesn't pass request attribute #4278

@decentral1se

Description

@decentral1se

Steps to reproduce

Override get_serializer_class for any view that inherits from GenericAPIView and attempt to access the request attribute when using the new SchemaGenerator, or going through DefaultRouter.

Expected behavior

The request attribute is passed into SchemaGenerator initialisation and subsequent methods have access to it.

Actual behavior

AttributeError: '<view-name>' object has no attribute 'request'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy