Merge pull request 'refs #631 - API improvement' (#7) from add_python_scripts into main

Reviewed-on: #7
deb-packages 0.5.5
Gerardo GIl Elizeire 2024-11-21 13:08:27 +01:00
commit 6650cb28af
1 changed files with 5 additions and 2 deletions

View File

@ -52,11 +52,14 @@ config_file = '/opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg'
# Creamos una instancia de la aplicación Flask:
app = Flask(__name__)
# Configuración Swagger:
# Cargamos el contenido del archivo "swagger.yaml":
with open("swagger.yaml", "r") as file:
swagger_template = yaml.safe_load(file)
# Así cambiamos el nombre de la página (por defecto, es 'Flasgger'):
swagger_config = Swagger.DEFAULT_CONFIG
swagger_config['title'] = 'OgRepository API'
swagger = Swagger(app, template=swagger_template)