from falsy.falsy import FALSY f = FALSY(static_path='test', static_dir='static') f.swagger('frontend.yaml', ui=True) api = f.api
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
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
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
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
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
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
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
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
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
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
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
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
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
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