21 lines
432 B
Python
21 lines
432 B
Python
#!/usr/bin/env python3
|
|
|
|
import connexion
|
|
|
|
from openapi_server import encoder
|
|
|
|
|
|
def main():
|
|
app = connexion.App(__name__, specification_dir='./openapi/')
|
|
app.app.json_encoder = encoder.JSONEncoder
|
|
app.add_api('openapi.yaml',
|
|
base_path='/api',
|
|
arguments={'title': 'announcementService'},
|
|
pythonic_params=True)
|
|
|
|
app.run(port=8080)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|