aswi2021jmsd-gitlab4/swagger_server/__main__.py @ 07622265
1 | a4f50fca | Captain_Trojan | #!/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() |