Buckets:

download
raw
476 Bytes
"""Export OpenAPI spec from Lexy Server to JSON file for use in MkDocs"""
import json
from lexy.main import app
# Path of the openapi json file used by mkdocs
openapi_json_path = "docs/docs/reference/rest-api/openapi.json"
# Get OpenAPI schema as a dictionary
openapi_dict = app.openapi()
# Write OpenAPI schema to JSON file
with open(openapi_json_path, "w") as f:
json.dump(openapi_dict, f)
f.write("\n")
print(f"OpenAPI schema written to {openapi_json_path}")

Xet Storage Details

Size:
476 Bytes
·
Xet hash:
5a5ed98ee5b4a9a373b5da6ea625afc66f798b1ce223bc9c9b2da210f1bef564

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.