Commit Graph

2 Commits

Author SHA1 Message Date
xiaobo-gaga 28c6746a1c Update OAuth 2 docs (#348)
This PR starts the second pass of API doc accuracy review (without
changing doc structure).

## Included in this PR
- Add verification progress log for mock-account OAuth2 testing:
  - `openapi/audit/mock-account-review-2026-03-01.md`

## What has been verified
- Quote APIs: market temperature, history market temperature, security
list
- Watchlist API: groups
- Asset APIs checked and failure modes captured for current mock-account
scope

## Next commits (same PR)
- Apply field/response corrections in docs (en/zh-CN/zh-HK) based on
verified runtime behavior
- Keep original documentation layout unchanged
2026-03-01 10:58:29 +08:00
xiaobo-gaga 47139258bb Audit OAuth2 deployment and fix API docs across 3 locales (#346)
This PR performs an OAuth2/API docs audit and applies cross-locale fixes
for en / zh-CN / zh-HK.

## What was verified
- OAuth discovery endpoints are reachable:
-
`https://openapi.longportapp.com/.well-known/oauth-authorization-server`
-
`https://openapi.longbridge.xyz/.well-known/oauth-authorization-server`
(test only)
- Health endpoint works on prod/test: `/v1/test`
- Auth-required sample endpoint correctly rejects missing token:
`/v1/asset/account` -> 401

Audit report added:
- `openapi/audit/audit-summary.md`
- `openapi/audit/audit-summary.json`
- Script: `script/audit_api_docs.py`

## Docs fixes (all 3 locales)
1) Added OAuth 2.0 recommended flow to
`api-reference/how-to-access-api.md`
   - Added discovery URLs
   - Added bearer token usage
   - Clarified legacy signature docs are compatibility reference

2) Updated `api-reference/refresh-token-api.md`
- Clarified OAuth2 refresh recommendation via `/oauth2/token` +
`grant_type=refresh_token`
   - Kept legacy `/v1/token/refresh` as compatibility reference

3) Added Mintlify-style per-endpoint API listing page under API
Reference:
   - `api-reference/endpoints.md`
   - One-by-one API listing with Method + Path + doc link + Try link

4) Expanded API Reference group by default (`collapsed: false`) for
easier discovery.

## Result
- API docs are now clearer about OAuth2 deployment status.
- API listing/discoverability is significantly improved.
- Cross-locale consistency for documented HTTP APIs is verified (0
parity gaps found).
2026-03-01 10:23:09 +08:00