aswi2021jmsd-gitlab/swagger_server/__main__.py @ fa03de5c
1 |
#!/usr/bin/env python3
|
---|---|
2 |
import logging |
3 |
|
4 |
import connexion |
5 |
|
6 |
from swagger_server import encoder |
7 |
|
8 |
|
9 |
def main(): |
10 |
app = connexion.App(__name__, specification_dir='./swagger/', debug=False) |
11 |
app.app.json_encoder = encoder.JSONEncoder |
12 |
app.add_api('swagger.yaml', arguments={'title': 'X.509 certificate management'}, base_path="/", pythonic_params=True) |
13 |
app.run(port=8080) |
14 |
|
15 |
|
16 |
if __name__ == '__main__': |
17 |
main() |