Consider authorization for OpenAPI request examples #606
Replies: 2 comments 2 replies
-
Nice suggestions - I'll relay to the team! |
Beta Was this translation helpful? Give feedback.
-
Hey @arredond, sorry for the delay, here's what I found In your specification, it looks like both paths you provided in your screenshot don't have the If you add the "security": [
{
"bearerAuth": []
}
] Some of your endpoints already have the For the “Try it” feature, it displays available Let me know if you run into any other issues, happy to help! |
Beta Was this translation helpful? Give feedback.
-
It's very nice that Gitbook takes OpenAPI security schemes into account and shows them in OpenAPI blocks, but the code examples don't, which may cause significant confusion among users.
In this screenshot, I'd expect the code example to include something like
-H "Authorization: Bearer $API_TOKEN"
.Ideally, the "Try it" module would also have the specified authorization method pre-checked, though I recognize this is harder since you use an external provider for it.
Beta Was this translation helpful? Give feedback.
All reactions