Right now previews show sample response data. But a lot of developers also want to see how to authenticate with an API before they commit to using it.
Proposed solution
Add an auth preview type that renders a code snippet showing how to make an authenticated request, tailored to the API's auth method (API key in header, query param, OAuth flow, etc.).
Preview types needed
- API Key in header:
Authorization: Bearer YOUR_KEY
- API Key as query param:
?api_key=YOUR_KEY
- OAuth 2.0 flow overview
Acceptance criteria
- New
auth preview type added to the preview registry
- Syntax highlighted code block
- Auth method pulled from catalog.json data
Right now previews show sample response data. But a lot of developers also want to see how to authenticate with an API before they commit to using it.
Proposed solution
Add an
authpreview type that renders a code snippet showing how to make an authenticated request, tailored to the API's auth method (API key in header, query param, OAuth flow, etc.).Preview types needed
Authorization: Bearer YOUR_KEY?api_key=YOUR_KEYAcceptance criteria
authpreview type added to the preview registry