We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c07a3d9 commit fb6f2ebCopy full SHA for fb6f2eb
application/web/web_main.py
@@ -378,6 +378,21 @@ def standards() -> Any:
378
return standards
379
380
381
+@app.route("/rest/v1/openapi.yaml", methods=["GET"])
382
+def openapi_spec() -> Any:
383
+ """
384
+ Serve the OpenAPI specification for the OpenCRE REST API.
385
386
+ return send_from_directory(
387
+ directory=os.path.join(
388
+ os.path.dirname(os.path.realpath(__file__)),
389
+ "../../docs/api",
390
+ ),
391
+ path="openapi.yaml",
392
+ mimetype="application/yaml",
393
+ )
394
+
395
396
@app.route("/rest/v1/text_search", methods=["GET"])
397
def text_search() -> Any:
398
"""
0 commit comments