MCPcopy Create free account
hub / github.com/MemTensor/MemOS / export_openapi

Function export_openapi

src/memos/cli.py:21–34  ·  view source on GitHub ↗

Export OpenAPI schema to JSON file.

(output: str)

Source from the content-addressed store, hash-verified

19
20
21def export_openapi(output: str) -> bool:
22 """Export OpenAPI schema to JSON file."""
23 app = get_openapi_app()
24
25 # Create directory if it doesn't exist
26 if os.path.dirname(output):
27 os.makedirs(os.path.dirname(output), exist_ok=True)
28
29 with open(output, "w") as f:
30 json.dump(app.openapi(), f, indent=2)
31 f.write("\n")
32
33 print(f"✅ OpenAPI schema exported to: {output}")
34 return True
35
36
37def download_examples(dest: str) -> bool:

Callers 3

mainFunction · 0.85

Calls 4

get_openapi_appFunction · 0.85
writeMethod · 0.65
openFunction · 0.50
dumpMethod · 0.45

Tested by 2