refs #631 - API improvement
parent
d1fa8a6037
commit
965795c416
|
@ -52,11 +52,14 @@ config_file = '/opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg'
|
||||||
# Creamos una instancia de la aplicación Flask:
|
# Creamos una instancia de la aplicación Flask:
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
# Cargamos el contenido del archivo "swagger.yaml":
|
||||||
# Configuración Swagger:
|
|
||||||
with open("swagger.yaml", "r") as file:
|
with open("swagger.yaml", "r") as file:
|
||||||
swagger_template = yaml.safe_load(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)
|
swagger = Swagger(app, template=swagger_template)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue