Ejemplo n.º 1
0
def swagger_build(title, version):
    swag = dict()
    swag['swagger']='2.0'
    swag['info']=dict(title=title, version=version)
    swag['paths']={}
    for p in g.get_paths():
        if len(p[1]) > 0:
            swag['paths'][p[0]] = {k: {} for k in p[1]}
    return swag
Ejemplo n.º 2
0
def swagger_build(title, version):
    swag = dict()
    swag['swagger'] = '2.0'
    swag['info'] = dict(title=title, version=version)
    swag['paths'] = {}
    for p in g.get_paths():
        if len(p[1]) > 0:
            swag['paths'][p[0]] = {k: {} for k in p[1]}
    return swag
Ejemplo n.º 3
0
def swagger_build(title, version):
    swag = dict()
    swag['swagger'] = '2.0'
    swag['info'] = dict(title=title, version=version)
    swag['consumes'] = []
    swag['produces'] = []
    swag['paths'] = {}
    for p in g.get_paths():
        if p[0] not in swag['paths']:
            swag['paths'][p[0]] = _tuple_to_dict(p[1])
        elif len(p[1]) > 0:
            swag['paths'][p[0]].update(_tuple_to_dict(p[1]))
    return swag
Ejemplo n.º 4
0
def swagger_build(title, version):
    swag = dict()
    swag['swagger'] = '2.0'
    swag['info'] = dict(title=title, version=version)
    swag['consumes'] = []
    swag['produces'] = []
    swag['paths'] = {}
    for p in g.get_paths():
        if p[0] not in swag['paths']:
            swag['paths'][p[0]] = _tuple_to_dict(p[1])
        elif len(p[1]) > 0:
            swag['paths'][p[0]].update(_tuple_to_dict(p[1]))
    swag['definitions'] = g._definitions
    return swag
Ejemplo n.º 5
0
def paths_build():
    paths = {}
    for p in g.get_paths():
        paths[p[0]] = p[3]
    return paths
Ejemplo n.º 6
0
def controllers_build():
    ctlrs = {}
    for p in g.get_paths():
        ctlrs[p[0]] = p[2]
    return ctlrs
Ejemplo n.º 7
0
def paths_build():
    paths = {}
    for p in g.get_paths():
        paths[p[0]] = p[3]
    return paths
Ejemplo n.º 8
0
def controllers_build():
    ctlrs = {}
    for p in g.get_paths():
        ctlrs[p[0]] = p[2]
    return ctlrs