Ë
    º2Úiw  ã                   óô   — d dl mZ d dlmZmZmZmZmZmZm	Z	 d dl
mZ d dlmZ erd dlmZ d dlmZ  G d„ ded   «      Z G d	„ d
ed
   «      Z G d„ ded   «      Z G d„ ded   «      Z G d„ ded   «      Zy)é    )Úabstractmethod)ÚTYPE_CHECKINGÚAnyÚDictÚListÚOptionalÚTypeÚUnion)ÚOpenApiGeneratorExtension)Ú	Direction)ÚAPIView)Ú
AutoSchemac            
       óª   — e Zd ZU dZg Zed    ed<   eeee   f   ed<   dddee	eee
   f   ee	eee
   f      f   fd„Zedddeeee   f   fd„«       Zy	)
ÚOpenApiAuthenticationExtensionaA  
    Extension for specifying authentication schemes.

    The common use-case usually consists of setting a ``name`` string and returning a dict from
    ``get_security_definition``. To model a group of headers that go together, set a list
    of names and return a corresponding list of definitions from ``get_security_definition``.

    The view class is available via ``auto_schema.view``, while the original authentication class
    can be accessed via ``self.target``. If you want to override an included extension, be sure to
    set a higher matching priority by setting the class attribute ``priority = 1`` or higher.

    get_security_requirement is expected to return a dict with security object names as keys and a
    scope list as value (usually just []). More than one key in the dict means that each entry is
    required (AND). If you need alternate variations (OR), return a list of those dicts instead.

    ``get_security_definition()`` is expected to return a valid `OpenAPI security scheme object
    <https://spec.openapis.org/oas/v3.0.3#securitySchemeObject>`_
    Ú	_registryÚnameÚauto_schemar   Úreturnc                 ó¸   — | j                   sJ d«       ‚t        | j                   t        «      r| j                   g iS | j                   D �ci c]  }|g “Œ c}S c c}w )Nzname(s) must be specified)r   Ú
isinstanceÚstr)Úselfr   r   s      úQ/var/www/html/acx/venv/lib/python3.12/site-packages/drf_spectacular/extensions.pyÚget_security_requirementz7OpenApiAuthenticationExtension.get_security_requirement$   sN   € ð �yŠyÐ5Ð5Ó5ˆyÜ�d—i‘i¤Ô%Ø—I‘I˜r�?Ð"à)-¯©Ö3 �D˜"‘HÒ3Ð3ùÒ3s   Á

Ac                  ó   — y ©N© )r   r   s     r   Úget_security_definitionz6OpenApiAuthenticationExtension.get_security_definition-   ó   € àó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__annotations__r
   r   r   r   r   r   Údictr   r   r    r   r   r      s�   … ñð$ 9;€IˆtÐ4Ñ5Ó:à
��T˜#‘Y�Ñ
Óð4Ø+ð4à	ˆt�C˜˜c™�NÑ# T¨$¨s°D¸±I¨~Ñ*>Ñ%?Ð?Ñ	@ó4ð ð°<ð ÀEÈ$ÐPTÐUYÑPZÐJZÑD[ò ó ñr    r   c                   óP   — e Zd ZU dZg Zed    ed<   dddedee	   fd„Z
dddefd„Zy	)
ÚOpenApiSerializerExtensiona  
    Extension for replacing an insufficient or specifying an unknown Serializer schema.

    The existing implementation of ``map_serializer()`` will generate the same result
    as *drf-spectacular* would. Either augment or replace the generated schema. The
    view instance is available via ``auto_schema.view``, while the original serializer
    can be accessed via ``self.target``.

    ``map_serializer()`` is expected to return a valid `OpenAPI schema object
    <https://spec.openapis.org/oas/v3.0.3#schemaObject>`_.
    r   r   r   Ú	directionr   c                  ó   — y)z3 return str for overriding default name extraction Nr   ©r   r   r)   s      r   Úget_namez#OpenApiSerializerExtension.get_name@   ó   € àr    c                 ó>   — |j                  | j                  |d¬«      S )z, override for customized serializer mapping T)Úbypass_extensions)Ú_map_serializerÚtarget_classr+   s      r   Úmap_serializerz)OpenApiSerializerExtension.map_serializerD   s!   € à×*Ñ*¨4×+<Ñ+<¸iÐ[_Ð*Ó`Ð`r    N)r!   r"   r#   r$   r   r   r%   r   r   r   r,   r2   r   r    r   r(   r(   2   sN   … ñ
ð 57€IˆtÐ0Ñ1Ó6ð Lð ¸Yð È8ÐTWÉ=ó ða¨,ð aÀ9ô ar    r(   c                   óR   — e Zd ZU dZg Zed    ed<   dee   fd„Z	e
dddefd„«       Zy	)
ÚOpenApiSerializerFieldExtensiona;  
    Extension for replacing an insufficient or specifying an unknown SerializerField schema.

    To augment the default schema, you can get what *drf-spectacular* would generate with
    ``auto_schema._map_serializer_field(self.target, direction, bypass_extensions=True)``.
    and edit the returned schema at your discretion. Beware that this may still emit
    warnings, in which case manual construction is advisable.

    ``map_serializer_field()`` is expected to return a valid `OpenAPI schema object
    <https://spec.openapis.org/oas/v3.0.3#schemaObject>`_.
    r   r   c                  ó   — y)zH return str for breaking out field schema into separate named component Nr   ©r   s    r   r,   z(OpenApiSerializerFieldExtension.get_nameW   r-   r    r   r   r)   c                  ó   — y)z2 override for customized serializer field mapping Nr   r+   s      r   Úmap_serializer_fieldz4OpenApiSerializerFieldExtension.map_serializer_field[   s   € ð 	r    N)r!   r"   r#   r$   r   r   r%   r   r   r,   r   r   r8   r   r    r   r4   r4   I   sK   … ñ
ð :<€IˆtÐ5Ñ6Ó;ð˜( 3™-ó ð ð°ð Èò ó ñr    r4   c                   óT   ‡ — e Zd ZU dZg Zed    ed<   eˆ fd„«       Ze	dd„«       Z
ˆ xZS )ÚOpenApiViewExtensionaF  
    Extension for replacing discovered views with a more schema-appropriate/annotated version.

    ``view_replacement()`` is expected to return a subclass of ``APIView`` (which includes
    ``ViewSet`` et al.). The discovered original view instance can be accessed with
    ``self.target`` and be subclassed if desired.
    r   c                 ó†   •— t         ‰| �  «        t        | j                  d«      r| j                  j                  | _        y y )NÚcls)ÚsuperÚ_load_classÚhasattrr1   r<   )r<   Ú	__class__s    €r   r>   z OpenApiViewExtension._load_classk   s7   ø€ ä‰ÑÔä�3×#Ñ# UÔ+Ø"×/Ñ/×3Ñ3ˆCÕð ,r    c                  ó   — y r   r   r6   s    r   Úview_replacementz%OpenApiViewExtension.view_replacementr   r   r    )r   zType[APIView])r!   r"   r#   r$   r   r   r%   Úclassmethodr>   r   rB   Ú__classcell__)r@   s   @r   r:   r:   a   s@   ø… ñð /1€IˆtÐ*Ñ+Ó0àó4ó ð4ð òó ôr    r:   c                   óF   — e Zd ZU dZg Zed    ed<   edddee   fd„«       Z	y)ÚOpenApiFilterExtensiona-  
    Extension for specifying a list of filter parameters for a given ``FilterBackend``.

    The original filter class object can be accessed via ``self.target``. The attached view
    is accessible via ``auto_schema.view``.

    ``get_schema_operation_parameters()`` is expected to return either an empty list or a list
    of valid raw `OpenAPI parameter objects
    <https://spec.openapis.org/oas/v3.0.3#parameterObject>`_.
    Using ``drf_spectacular.plumbing.build_parameter_type`` is recommended to generate
    the appropriate raw dict objects.
    r   r   r   r   c                  ó   — y r   r   )r   r   ÚargsÚkwargss       r   Úget_schema_operation_parametersz6OpenApiFilterExtension.get_schema_operation_parameters†   r   r    N)
r!   r"   r#   r$   r   r   r%   r   r&   rJ   r   r    r   rF   rF   w   s@   … ñð 13€IˆtÐ,Ñ-Ó2àð¸<ð Ð]aÐbfÑ]gò ó ñr    rF   N)Úabcr   Útypingr   r   r   r   r   r	   r
   Údrf_spectacular.plumbingr   Údrf_spectacular.utilsr   Úrest_framework.viewsr   Údrf_spectacular.openapir   r   r(   r4   r:   rF   r   r    r   ú<module>rQ      s‚   ðÝ ß H× HÑ Hå >Ý +áÝ,å2ô"Ð%>Ð?_Ñ%`ô "ôJaÐ!:Ð;WÑ!Xô aô.Ð&?Ð@aÑ&bô ô0Ð4Ð5KÑLô ô,Ð6Ð7OÑPõ r    