1
0
mirror of https://github.com/enpaul/kodak.git synced 2025-06-06 23:03:25 +00:00
kodak/dehance/resources/openapi.py

20 lines
357 B
Python
Raw Normal View History

from pathlib import Path
from ruamel.yaml import YAML
2021-05-02 18:12:04 -04:00
from dehance.resources._shared import DehanceResource
yaml = YAML(typ="safe")
2021-05-02 18:12:04 -04:00
class OpenAPI(DehanceResource):
routes = ("/openapi.json",)
def get(self):
with (Path(__file__).parent, "openapi.yaml").open() as infile:
data = yaml.load(infile)
return data, 200