mirror of
https://github.com/enpaul/kodak.git
synced 2025-09-18 21:21:59 +00:00
Rename project to fresnel-lens
This commit is contained in:
19
fresnel_lens/resources/openapi.py
Normal file
19
fresnel_lens/resources/openapi.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from pathlib import Path
|
||||
|
||||
from ruamel.yaml import YAML
|
||||
|
||||
from fresnel_lens.resources._shared import FresnelResource
|
||||
|
||||
yaml = YAML(typ="safe")
|
||||
|
||||
|
||||
class OpenAPI(FresnelResource):
|
||||
|
||||
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