Publish curated MobilityOps source snapshot

This commit is contained in:
Jens committed 2026-09-29 22:03:33 +02:00
commit 7adc072f5e
317 files changed
+48851

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
"""Generate the checked-in API contract from the FastAPI application."""
from __future__ import annotations
import sys
from pathlib import Path
import yaml
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT / "backend"))
from app.main import app # noqa: E402
def main() -> None:
schema = app.openapi()
schema["info"]["description"] = (
"Generated contract for Fleet Ops. The visible product name is Fleet Ops; "
"MobilityOps remains the technical repository and service identifier."
)
schema["servers"] = [{"url": "http://localhost:8128"}]
output = ROOT / "contracts" / "openapi.yaml"
output.write_text(
yaml.safe_dump(schema, sort_keys=False, allow_unicode=True, width=100),
encoding="utf-8",
)
if __name__ == "__main__":
main()