diff --git a/api/NOTES.md b/api/NOTES.md index a91c0a8ac..e075c029c 100644 --- a/api/NOTES.md +++ b/api/NOTES.md @@ -1,3 +1,21 @@ +#### autogenerated api frontend + +API can autogenerate a frontend that documents, and allows to play +with, in a limited way, its interface. Make sure you have the +following variables inside the current `.env`: + +``` +docs_url=/docs +root_path='' +``` + +If the `.env` that is in-use is based on `env.default` then it is +already the case. Start, or restart the http server, then go to +`https://127.0.0.1:8000/docs`. That is autogenerated documentation +based on pydantic schema, fastapi routes, and docstrings :wink:. + +Happy experiments, and then documentation! + #### psycopg3 API I mis-remember the psycopg v2 vs. v3 API. @@ -13,7 +31,7 @@ following pseudo code: return row["exists"] ``` -Minding the following: +Mind the following: - Where `app.state.postgresql` is the postgresql connection pooler. - Wrap explicit transaction with `async with cnx.transaction(): diff --git a/api/env.dev b/api/env.dev index 45650fd8a..ab74f5c0b 100644 --- a/api/env.dev +++ b/api/env.dev @@ -11,7 +11,6 @@ captcha_server= change_password_link=/changepassword?invitation=%s&&pass=%s DEVTOOLS_MOB_PATTERN=%(sessionId)s/devtools.mobs docs_url=/docs -docs_url=/docs EFS_DEVTOOLS_MOB_PATTERN=%(sessionId)s/devtools.mob EFS_SESSION_MOB_PATTERN=%(sessionId)s/dom.mob EMAIL_FROM=Openreplay-dev