mirror of
https://github.com/enpaul/kodak.git
synced 2025-12-17 16:30:37 +00:00
Rename project to imagemuck
This commit is contained in:
19
imagemuck/resources/openapi.py
Normal file
19
imagemuck/resources/openapi.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from pathlib import Path
|
||||
|
||||
from ruamel.yaml import YAML
|
||||
|
||||
from imagemuck.resources._shared import ImageMuckResource
|
||||
|
||||
yaml = YAML(typ="safe")
|
||||
|
||||
|
||||
class OpenAPI(ImageMuckResource):
|
||||
|
||||
routes = ("/openapi.json",)
|
||||
|
||||
def get(self):
|
||||
|
||||
with (Path(__file__).parent, "openapi.yaml").open() as infile:
|
||||
data = yaml.load(infile)
|
||||
|
||||
return data, 200
|
||||
Reference in New Issue
Block a user