Skip to content

Render OpenAPI security scheme descriptions in the Authorization section#757

Open
krishna28004 wants to merge 1 commit into
AgoraIO:mainfrom
krishna28004:fix/562-expand-authorization-details
Open

Render OpenAPI security scheme descriptions in the Authorization section#757
krishna28004 wants to merge 1 commit into
AgoraIO:mainfrom
krishna28004:fix/562-expand-authorization-details

Conversation

@krishna28004

Copy link
Copy Markdown

Summary

Fixes #562

This PR enhances the Authorization section for OpenAPI reference pages by rendering the descriptions defined in components.securitySchemes instead of displaying authentication badges alone.

For the Conversational AI APIs, it also enriches the security scheme descriptions with links to the existing authentication documentation and concrete authorization header examples, making the Join API self-contained for authentication guidance.

Type of Change

  • Documentation content
  • Docs site behavior
  • Navigation, routing, or metadata
  • OpenAPI or generated reference
  • Build, tooling, or CI

What Changed

  • Added a helper to resolve OpenAPI security scheme definitions from the dereferenced document.
  • Updated the Authorization section renderer to display Markdown descriptions beneath each authentication badge.
  • Preserved existing badge rendering and graceful fallback when descriptions are unavailable.
  • Enriched the Conversational AI basicAuth and tokenAuth security scheme descriptions with:
    • links to existing authentication documentation
    • concrete Authorization header examples
  • Added test coverage for:
    • multiple security schemes
    • Markdown rendering
    • fallback behavior

Verification

  • Verified only the intended files were modified
  • Updated component tests
  • Confirmed graceful fallback when descriptions are absent
  • Confirmed the renderer remains generic and reusable across OpenAPI pages

Note: Existing upstream lint/test failures were observed but are unrelated to this change and were reproduced against the current upstream state.

Notes for Reviewers

This implementation intentionally reuses the existing components.securitySchemes metadata rather than introducing new vendor extensions or operation-specific documentation. The renderer remains generic and automatically benefits any OpenAPI specification that provides security scheme descriptions.

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.

docs: expand Authorization details for Conversational AI Join API

1 participant