refs #1084 Adds swagger documentation to all endpoints of ogrepository
parent
62e67b7437
commit
43846b0382
|
@ -20,8 +20,8 @@ import os
|
|||
import subprocess
|
||||
import json
|
||||
from time import sleep
|
||||
|
||||
|
||||
from flasgger import Swagger
|
||||
import yaml
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# VARIABLES
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
@ -32,7 +32,6 @@ repo_file = '/opt/opengnsys/etc/repoinfo.json'
|
|||
trash_file = '/opt/opengnsys/etc/trashinfo.json'
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# FUNCTIONS
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
@ -41,7 +40,9 @@ trash_file = '/opt/opengnsys/etc/trashinfo.json'
|
|||
# Creamos una instancia de la aplicación Flask:
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
with open("swagger.yaml", "r") as file:
|
||||
swagger_template = yaml.safe_load(file)
|
||||
swagger = Swagger(app, template=swagger_template)
|
||||
# ---------------------------------------------------------
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue