You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract parameter descriptions from docstrings for describe page
Parse Google-style Args: sections from Protocol method docstrings using
docstring-parser and surface them through introspection and the HTML
describe page. Adds param_docs field to RpcMethodInfo and
MethodDescription, bumps DESCRIBE_VERSION to 3, and adds a Description
column to the parameters table on the describe page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/api/http.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,45 @@ with http_connect(MyService, client=client) as proxy:
40
40
assert proxy.echo(message="hello") =="hello"
41
41
```
42
42
43
+
### Landing Page
44
+
45
+
By default, `GET {prefix}` (e.g. `GET /vgi`) returns an HTML landing page showing the `vgi-rpc` logo, the protocol name, server ID, and links. When the server has `enable_describe=True`, the landing page includes a link to the [describe page](#describe-page).
`POST {prefix}` returns 405 Method Not Allowed — it does not interfere with RPC routing.
54
+
55
+
### Describe Page
56
+
57
+
When the server has `enable_describe=True`, `GET {prefix}/describe` (e.g. `GET /vgi/describe`) returns an HTML page listing all methods, their parameters (name, type, default), return types, docstrings, and method type badges (UNARY / STREAM). The `__describe__` introspection method is filtered out.
58
+
59
+
Both `enable_describe=True` on the `RpcServer`**and**`enable_describe_page=True` (the default) on `make_wsgi_app()` are required.
60
+
61
+
To disable only the HTML page while keeping the `__describe__` RPC method available:
When the describe page is active, the path `{prefix}/describe` is reserved for the HTML page. If your service has an RPC method literally named `describe`, you must set `enable_describe_page=False`.
69
+
70
+
### Not-Found Page
71
+
72
+
By default, `make_wsgi_app()` installs a friendly HTML 404 page for any request that does not match an RPC route. If someone navigates to the server root or a random path in a browser, they see the `vgi-rpc` logo, the service protocol name, and a link to [vgi-rpc.query.farm](https://vgi-rpc.query.farm) instead of a generic error.
73
+
74
+
This does **not** affect RPC clients — a request to a valid RPC route for a non-existent method still returns a machine-readable Arrow IPC error with HTTP 404.
|`enable_not_found_page`| Friendly HTML 404 for unmatched routes |`True`|
50
+
|`enable_landing_page`| HTML landing page at `GET {prefix}`|`True`|
51
+
|`enable_describe_page`| HTML describe page at `GET {prefix}/describe`|`True` (requires `enable_describe=True`) |
49
52
50
53
!!! warning "Signing key in multi-worker deployments"
51
54
Stream state tokens are signed with HMAC-SHA256. If each worker generates its own random key, a token signed by worker A is rejected by worker B. **Always provide a shared `signing_key`** from environment variables or a secrets manager.
@@ -419,4 +422,7 @@ Before going live, verify these settings:
419
422
-**Introspection** — `enable_describe=True` for [service discovery](api/introspection.md) (disable in production if sensitive)
420
423
-**Logging** — structured JSON logging with [`VgiJsonFormatter`](api/logging.md)
421
424
-**OpenTelemetry** — [`otel_config`](api/otel.md) for distributed tracing (`pip install vgi-rpc[otel]`)
425
+
-**Not-found page** — `enable_not_found_page=True` (default) shows a branded HTML 404; set to `False` if you prefer your reverse proxy's error pages
426
+
-**Landing page** — `enable_landing_page=True` (default) serves an HTML page at `GET {prefix}` with protocol name, server ID, and links
427
+
-**Describe page** — `enable_describe_page=True` (default) serves an HTML API reference at `GET {prefix}/describe` when `enable_describe=True`; disable in production if sensitive
422
428
-**Health check** — platform health probe configured (e.g., Cloud Run startup probe)
0 commit comments