mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Read openapi schema for the owasp scan
This commit is contained in:
10
app/docs/__init__.py
Normal file
10
app/docs/__init__.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from os import path
|
||||
|
||||
from flask import Blueprint, current_app, send_file
|
||||
|
||||
docs = Blueprint('docs', __name__, url_prefix='/docs')
|
||||
|
||||
@docs.route('/openapi.yml', methods=['GET'])
|
||||
def send_openapi():
|
||||
openapi_schema = path.join(current_app.root_path, '../docs/openapi.yml')
|
||||
return send_file(openapi_schema, mimetype='text/yaml'), 200
|
||||
Reference in New Issue
Block a user