Files
bracket/backend/tests/unit_tests/openapi_test.py
Erik Vroon a548ff6d61 Use hey-api (#1479)
Store the `openapi.json` of the backend in the repo and import it using
https://heyapi.dev/ to generate TypeScript types for the backend API
query params, responses, bodies.
2025-12-20 19:32:33 +01:00

10 lines
234 B
Python

import json
from pathlib import Path
from bracket.app import app
def test_openapi_up_to_date() -> None:
schema = app.openapi()
assert Path("openapi/openapi.json").read_text() == json.dumps(schema, indent=2, sort_keys=True)