MCPcopy
hub / github.com/fastapi/fastapi / _make_ujson_app

Function _make_ujson_app

tests/test_deprecated_responses.py:53–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def _make_ujson_app() -> FastAPI:
54 with warnings.catch_warnings():
55 warnings.simplefilter("ignore", FastAPIDeprecationWarning)
56 app = FastAPI(default_response_class=UJSONResponse) # ty: ignore[deprecated]
57
58 @app.get("/items")
59 def get_items() -> Item:
60 return Item(name="widget", price=9.99)
61
62 return app
63
64
65@needs_ujson

Calls 1

FastAPIClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…