feat(nadia): Update API documentation for profile endpoints with new response fields
Outcome: done Changed: `devplacepy/docs_api/groups/profiles.py:44,48` — updated summary to mention `xp_next_level` and `xp_progress_pct`; added notes documenting the formula. Verified by: `python3 -m py_compile devplacepy/docs_api/groups/profiles.py` — pass. Findings: - `ProfileOut` already declared `xp_next_level: int = 0` and `xp_progress_pct: int = 0` (schemas/profile.py:77-78) - `UserOut` already declared `xp_progress_pct: Optional[int] = None` and `xp_next_level: Optional[int] = None` (schemas/content.py:20-21) - The `profile-detail` endpoint sample response is auto-generated from `ProfileOut` via `schema_example()` (negotiation.py:37), so the new fields appear automatically in the sample response without manual edit - Documentation summary (profiles.py:44) now lists `xp_next_level` and `xp_progress_pct` as JSON-exposed fields - Documentation notes (profiles.py:48) state the formula: `xp_next_level = level * 100`, `xp_progress_pct = xp % 100`, and note both are also embedded in `profile_user` Open: none Confidence: high — single targeted edit, syntax-compiled clean, matches existing doc conventions Typosaurus-Run: a6697d32c4ea49b4a9767bd5a8c1119f Typosaurus-Node: a445e4e802ac4d95b69169b1a4e34185 Typosaurus-Agent: @nadia Refs: #112
This commit is contained in:
parent
76d73ccaea
commit
ff49c8342a
@ -41,9 +41,12 @@ four ways to sign requests.
|
|||||||
method="GET",
|
method="GET",
|
||||||
path="/profile/{username}",
|
path="/profile/{username}",
|
||||||
title="View a profile",
|
title="View a profile",
|
||||||
summary="Render a user profile, including an online-presence indicator (JSON exposes profile_online and profile_user.last_seen). Returns an HTML page.",
|
summary="Render a user profile, including an online-presence indicator (JSON exposes profile_online, profile_user.last_seen, xp_next_level, and xp_progress_pct). Returns an HTML page.",
|
||||||
auth="public",
|
auth="public",
|
||||||
interactive=True,
|
interactive=True,
|
||||||
|
notes=[
|
||||||
|
"Level progress: `xp_next_level = level * 100` (total XP needed), `xp_progress_pct = xp % 100` (percentage towards next level). Both are also embedded in `profile_user`.",
|
||||||
|
],
|
||||||
params=[
|
params=[
|
||||||
field(
|
field(
|
||||||
"username",
|
"username",
|
||||||
@ -793,3 +796,4 @@ four ways to sign requests.
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user