mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-11 00:57:00 +00:00
16 lines
296 B
Python
16 lines
296 B
Python
|
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
|