FastUI icon indicating copy to clipboard operation
FastUI copied to clipboard

Expanding the components in /docs hang the server

Open mohandoz opened this issue 1 year ago • 4 comments

When expanding any components /docs hang the server and make it unresponsive, a restart for the server and a page kill is needed.

there's no logs on the console, it produced on the sample of the fastapi app in the doc

Browsers: Chrome Version 119.0.6045.199 (Official Build) (arm64) Firefox version 120 mac

Screenshot 2023-12-03 at 11 27 07 AM

mohandoz avatar Dec 03 '23 08:12 mohandoz

Ye I've noticed it, it'll be because the JSON Schema is too big.

We should try to fix the JSON Schema, otherwise switch off the docs.

samuelcolvin avatar Dec 05 '23 06:12 samuelcolvin

should be improved somewhat once https://github.com/pydantic/pydantic/issues/8320 is fixed as the JSON Schema will be a bit smaller.

samuelcolvin avatar Dec 08 '23 12:12 samuelcolvin

Even with pydantic#8320 fixed the slow/unresponsive docs problem seems to be still there (example: from the demo app docs) Since this is a problem with the fastui endpoints, but one might still want to add a few pure fastapi endpoint and the docs for those still works normally, maybe there is a way to only disable docs for the /api endpoints?

mikonapoli avatar Feb 25 '24 10:02 mikonapoli

Anybody tried this(Add an example on schema) ?

Dragon-GCS avatar Apr 23 '24 14:04 Dragon-GCS