File: //home/arjun/projects/env/lib/python3.10/site-packages/flask_restx/__pycache__/api.cpython-310.pyc
o
/we�� � @ s d dl Z d dlZd dlmZ d dlZd dlZd dlZd dlZd dlZd dl m
Z
d dlmZm
Z
d dlmZ d dlmZmZmZ d dlmZ zd dlmZ W n ey] d dlmZ Y nw d d lmZ d d
lmZ d dlmZ d dl m!Z! d d
l"m#Z#m$Z$m%Z%m&Z&m'Z' d dl(m)Z* e*�+d�d dkr�d dl,m-Z. nd dl,m.Z. ddl/m0Z0 ddl1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z=m>Z>m?Z? ddl@mAZA ddlBmCZC e�Dd�ZEdZFdeAfgZGe�HeI�ZJG d d!� d!eK�ZLG d"d#� d#e9�ZMd$d%� ZNd&d'� ZOdS )(� N)�chain)�OrderedDict)�wraps�partial)�
MethodType)�url_for�request�current_app)�
make_response)�_endpoint_from_view_func)�got_request_exception)�RefResolver)�cached_property)�Headers)�
HTTPException�MethodNotAllowed�NotFound�
NotAcceptable�InternalServerError)�__version__�.�2)�Response)�BaseResponse� )�apidoc)�
ParseError� MaskError)� Namespace)�PostmanCollectionV1)�Resource)�Swagger)�
default_id�
camel_to_dash�unpack)�output_json)�
HTTPStatusz(<.*>))zContent-Length�application/jsonc @ s� e Zd ZdZdddddddddddddeddddddd dddddd
fdd�Zd
d� Zdd� Zdd� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zdcd1d2�Zd3d4� Zd5d6� Zed7d8� �Zed9d:� �Zed;d<� �Zed=d>� �Z ed?d@� �Z!dAdB� Z"dCdD� Z#dEdF� Z$dGdH� Z%dIdJ� Z&dKdL� Z'dcdMdN�Z(dddOdP�Z)edQdR� �Z*edSdT� �Z+e, dedUdV��Z-dWdX� Z.dYdZ� Z/d[d\� Z0d]d^� Z1d_d`� Z2dadb� Z3dS )f�Apia�
The main entry point for the application.
You need to initialize it with a Flask Application: ::
>>> app = Flask(__name__)
>>> api = Api(app)
Alternatively, you can use :meth:`init_app` to set the Flask application
after it has been constructed.
The endpoint parameter prefix all views and resources:
- The API root/documentation will be ``{endpoint}.root``
- A resource registered as 'resource' will be available as ``{endpoint}.resource``
:param flask.Flask|flask.Blueprint app: the Flask application object or a Blueprint
:param str version: The API version (used in Swagger documentation)
:param str title: The API title (used in Swagger documentation)
:param str description: The API description (used in Swagger documentation)
:param str terms_url: The API terms page URL (used in Swagger documentation)
:param str contact: A contact email for the API (used in Swagger documentation)
:param str license: The license associated to the API (used in Swagger documentation)
:param str license_url: The license page URL (used in Swagger documentation)
:param str endpoint: The API base endpoint (default to 'api).
:param str default: The default namespace base name (default to 'default')
:param str default_label: The default namespace label (used in Swagger documentation)
:param str default_mediatype: The default media type to return
:param bool validate: Whether or not the API should perform input payload validation.
:param bool ordered: Whether or not preserve order models and marshalling.
:param str doc: The documentation path. If set to a false value, documentation is disabled.
(Default to '/')
:param list decorators: Decorators to attach to every resource
:param bool catch_all_404s: Use :meth:`handle_error`
to handle 404 errors throughout your app
:param dict authorizations: A Swagger Authorizations declaration as dictionary
:param bool serve_challenge_on_401: Serve basic authentication challenge with 401
responses (default 'False')
:param FormatChecker format_checker: A jsonschema.FormatChecker object that is hooked into
the Model validator. A default or a custom FormatChecker can be provided (e.g., with custom
checkers), otherwise the default action is to not enforce any format validation.
:param url_scheme: If set to a string (e.g. http, https), then the specs_url and base_url will explicitly use this
scheme regardless of how the application is deployed. This is necessary for some deployments behind a reverse
proxy.
:param str default_swagger_filename: The default swagger filename.
Nz1.0�/�defaultzDefault namespace� Fr'