Skip to content

feat(openapi): first-class docs UI and OpenAPI enrichment - #131

Merged
ZhuchkaTriplesix merged 3 commits into
devfrom
issue-130-openapi-docs-ui
Jul 20, 2026
Merged

feat(openapi): first-class docs UI and OpenAPI enrichment#131
ZhuchkaTriplesix merged 3 commits into
devfrom
issue-130-openapi-docs-ui

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Built-in Scalar/Swagger docs UI via App(..., docs_ui=...) / mount_docs() against /openapi.json
  • OpenAPI enrichment: :param{param} + path parameters, JWT bearerAuth, route/router tags, set_openapi_info / servers
  • Granian-compatible sync lifespan: __rsgi_init__(loop) runs on_startup via loop.run_until_complete (fixes never-awaited async override)

Closes #130

Test plan

  • make test (or focused: pytest tests/test_openapi.py tests/test_rsgi_lifespan.py)
  • App(docs_ui="scalar") → browser GET /docs loads UI against /openapi.json
  • JWT route shows Authorize / Bearer; path params bind as {id}
  • Subclass on_startup under granian --interface rsgi actually runs (no “never awaited”)

Ship Scalar/Swagger at /docs, OpenAPI {param} paths with parameters and
bearerAuth, tags/info/servers hooks, and sync __rsgi_init__(loop) via
on_startup so Granian actually runs worker startup. Closes #130.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 2f6beeb into dev Jul 20, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant