1
0
mirror of https://github.com/enpaul/kodak.git synced 2024-11-11 00:57:00 +00:00
kodak/imagemonk/resources/openapi.py

16 lines
296 B
Python
Raw Normal View History

from pathlib import Path
import flask_restful
from ruamel.yaml import YAML
yaml = YAML(typ="safe")
class OpenAPI(flask_restful.Resource):
def get(self):
with (Path(__file__).parent, "openapi.yaml").open() as infile:
data = yaml.load(infile)
return data, 200