コード例 #1
0
from falsy.falsy import FALSY

f = FALSY(static_path='test', static_dir='static')
f.swagger('frontend.yaml', ui=True)
api = f.api
コード例 #2
0
ファイル: serve.py プロジェクト: zhuangyan/falsy
from falsy.falsy import FALSY

f = FALSY(static_dir='demo/mm/static')
f.swagger('demo/mm/spec.yml', ui=True, ui_language='zh-cn', theme='impress')
api = f.api
コード例 #3
0
ファイル: serve.py プロジェクト: zhuangyan/falsy
from falsy.falsy import FALSY

f = FALSY(static_path='test', static_dir='demo/simple/static')
f.swagger('demo/split/ymls/spec.yml',
          ui=True,
          ui_language='zh-cn',
          theme='responsive')
api = f.api
コード例 #4
0
from demo.with_wsgi.ops.flask import flask_app, PRE_FLASK
from demo.with_wsgi.ops.tornado import tornado_app, PRE_TORNADO
from falsy.falsy import FALSY

f = FALSY(static_dir='demo/with_wsgi/static') \
    .swagger('demo/with_wsgi/spec.yml', ui=True, ui_language='zh-cn', theme='normal') \
    .wsgi(flask_app, PRE_FLASK) \
    .wsgi(tornado_app, PRE_TORNADO)
api = f.api


コード例 #5
0
ファイル: serve.py プロジェクト: zhuangyan/falsy
from falsy.falsy import FALSY

f = FALSY(static_path='test', static_dir='demo/plain_post/static')
f.swagger('demo/plain_post/spec.yml',
          ui=True,
          ui_language='zh-cn',
          theme='responsive')
api = f.api
コード例 #6
0
ファイル: serve.py プロジェクト: zhuangyan/falsy
from falsy.falsy import FALSY

f = FALSY(static_path='test',
          static_dir='demo/celery/static',
          log_config={'highlights': ['falsy']})
f.swagger('demo/celery/spec.yml',
          ui=True,
          ui_language='zh-cn',
          theme='impress',
          cors_origin='*')
api = f.api
コード例 #7
0
ファイル: main.py プロジェクト: espe90/TFG
from sys import path

from falsy.falsy import FALSY

from config.config import turtle_folder, catalog_folder, sparql_parser_folder, wrapperR_folder, api_servername
from core.yaml_generator import YamlGenerator

# Add SparQL and WrapperR path
path.append(sparql_parser_folder)
path.append(wrapperR_folder)

# Generate ML Catalog from Servides definition.
yml = YamlGenerator(turtle_folder, catalog_folder)

# Start OpenCCML Service
f = FALSY(static_dir='/core/static')
f.swagger('catalog/catalog.yml',
          ui=True,
          theme='impress',
          api_url=api_servername)
api = f.api
コード例 #8
0
ファイル: server.py プロジェクト: vesely-david/krypl-project
def main():
    f = FALSY()   #you need create the dir called static before you run
    f.swagger('calculatorAPI.yaml', ui=True, theme='impress') #impress theme is the responsive swagger ui, or you can use 'normal' here
    api = f.api
    return api
コード例 #9
0
ファイル: main.py プロジェクト: manuparra/oc2dm
from sys import path

from falsy.falsy import FALSY

from config.config import turtle_folder, catalog_folder, sparql_parser_folder, wrapperR_folder, api_servername
from core.yaml_generator import YamlGenerator

# Add SparQL and WrapperR path
path.append(sparql_parser_folder)
path.append(wrapperR_folder)

# Generate ML Catalog from Servides definition.
yml = YamlGenerator(turtle_folder, catalog_folder)

# Start OpenCCML Service
f = FALSY(static_dir='/core/static')
f.swagger('catalog/catalog.yml', ui=True, theme='impress')
api = f.api
コード例 #10
0
from falsy.falsy import FALSY

f = FALSY(static_path='test', static_dir='demo/json/static')
f.swagger('demo/json/spec.json', ui=True, ui_language='zh-cn', theme='impress')
api = f.api
コード例 #11
0
import json

from falsy.falsy import FALSY


class CustomException(Exception):
    pass


def handle_custom(req, resp, e):
    resp.body = json.dumps({'error': 'custom error catched'})
    resp.content_type = 'application/json'


f = FALSY(static_path='test', static_dir='demo/catch/static')
f.swagger('demo/catch/spec.yml', ui=True, theme='responsive',errors= {CustomException: handle_custom})
api = f.api
コード例 #12
0
from falsy.falsy import FALSY

f = FALSY()
f.swagger('spec1.yml',
          ui=True,
          ui_language='en',
          cors_origin='*',
          theme='normal')
# f.swagger('spec2.yml', ui=True, ui_language='zh-cn', theme='normal')
api = f.api
コード例 #13
0
from falsy.falsy import FALSY

f = FALSY(static_path='test', static_dir='demo/multi/static')
f.swagger('demo/multi/spec1.yml', ui=True, ui_language='zh-cn', theme='normal')
f.swagger('demo/multi/spec2.yml', ui=True, ui_language='zh-cn', theme='normal')
api = f.api
コード例 #14
0
ファイル: serve.py プロジェクト: koshikraj/falsy
from falsy.falsy import FALSY

f = FALSY(static_path='test',
          static_dir='demo/simple/static',
          log_config={'highlights': ['falsy']})
f.swagger('demo/simple/spec.yml',
          ui=True,
          ui_language='zh-cn',
          theme='bootstrap')
api = f.api
コード例 #15
0
ファイル: main.py プロジェクト: Blandry1/PyTests
from falsy.falsy import FALSY

f = FALSY()  #you need create the dir called static before you run
f.swagger(
    'test.yml', ui=True, theme='impress'
)  #impress theme is the responsive swagger ui, or you can use 'normal' here
api = f.api