OpenQuizz
Une application de gestion des contenus pédagogiques
flask_restplus.swagger Namespace Reference

Data Structures

class  Swagger
 

Functions

def ref (model)
 
def extract_path (path)
 
def extract_path_params (path)
 
def parse_docstring (obj)
 
def is_hidden (resource, route_doc=None)
 

Variables

dictionary PATH_TYPES
 
dictionary PY_TYPES
 
 RE_URL = re.compile(r'<(?:[^:<>]+:)?([^<>]+)>')
 
string DEFAULT_RESPONSE_DESCRIPTION = 'Success'
 
dictionary DEFAULT_RESPONSE = {'description': DEFAULT_RESPONSE_DESCRIPTION}
 
 RE_RAISES = re.compile(r'^:raises\s+(?P<name>[\w\d_]+)\s*:\s*(?P<description>.*)$', re.MULTILINE)
 

Function Documentation

◆ extract_path()

def flask_restplus.swagger.extract_path (   path)
Transform a Flask/Werkzeug URL pattern in a Swagger one.

◆ extract_path_params()

def flask_restplus.swagger.extract_path_params (   path)
Extract Flask-style parameters from an URL pattern as Swagger ones.

◆ is_hidden()

def flask_restplus.swagger.is_hidden (   resource,
  route_doc = None 
)
Determine whether a Resource has been hidden from Swagger documentation
i.e. by using Api.doc(False) decorator

◆ parse_docstring()

def flask_restplus.swagger.parse_docstring (   obj)

◆ ref()

def flask_restplus.swagger.ref (   model)
Return a reference to model in definitions

Variable Documentation

◆ DEFAULT_RESPONSE

dictionary DEFAULT_RESPONSE = {'description': DEFAULT_RESPONSE_DESCRIPTION}

◆ DEFAULT_RESPONSE_DESCRIPTION

string DEFAULT_RESPONSE_DESCRIPTION = 'Success'

◆ PATH_TYPES

dictionary PATH_TYPES
Initial value:
1 = {
2  'int': 'integer',
3  'float': 'number',
4  'string': 'string',
5  'default': 'string',
6 }

◆ PY_TYPES

dictionary PY_TYPES
Initial value:
1 = {
2  int: 'integer',
3  float: 'number',
4  str: 'string',
5  bool: 'boolean',
6  None: 'void'
7 }

◆ RE_RAISES

RE_RAISES = re.compile(r'^:raises\s+(?P<name>[\w\d_]+)\s*:\s*(?P<description>.*)$', re.MULTILINE)

◆ RE_URL

RE_URL = re.compile(r'<(?:[^:<>]+:)?([^<>]+)>')