mirror of
https://github.com/kennethreitz/kennethreitz.org.git
synced 2026-06-05 22:50:17 +00:00
Only include /api routes in OpenAPI schema
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1192,6 +1192,8 @@ async def api_schema(req, resp):
|
||||
route = getattr(r, "route", None)
|
||||
if not fn or not route or fn.__name__ in skip:
|
||||
continue
|
||||
if not route.startswith("/api"):
|
||||
continue
|
||||
doc = (fn.__doc__ or fn.__name__.replace("_", " ").title()).split("\n")[0].strip()
|
||||
params = []
|
||||
for part in route.split("/"):
|
||||
|
||||
Reference in New Issue
Block a user