U
    d                     @   sP   d dl mZmZmZ G dd deZededdddZejd	d
 Zdd Z	dS )    )url_for	Blueprintrender_templatec                       s,   e Zd ZdZ fddZ fddZ  ZS )Apidocz
    Allow to know if the blueprint has already been registered
    until https://github.com/mitsuhiko/flask/pull/1301 is merged
    c                    s   d| _ tt| j|| d S )NF)
registeredsuperr   __init__selfargskwargs	__class__ 6/tmp/pip-unpacked-wheel-dt_sn2ih/flask_restx/apidoc.pyr   
   s    zApidoc.__init__c                    s   t t| j|| d| _d S )NT)r   r   registerr   r	   r   r   r   r      s    zApidoc.register)__name__
__module____qualname____doc__r   r   __classcell__r   r   r   r   r      s   r   Z	restx_docZ	templatesZstaticz
/swaggerui)Ztemplate_folderZstatic_folderZstatic_url_pathc                 C   s   t d| dS )Nzrestx_doc.staticfilename)r   r   r   r   r   swagger_static   s    r   c                 C   s   t d| j| jdS )z"Render a SwaggerUI for a given APIzswagger-ui.html)title	specs_url)r   r   r   )apir   r   r   ui_for!   s    r   N)
Zflaskr   r   r   r   r   ZapidocZadd_app_template_globalr   r   r   r   r   r   <module>   s   	
