mirror of
https://github.com/evroon/bracket.git
synced 2026-04-20 15:27:00 -04:00
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.
10 lines
234 B
Python
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)
|