PaloAltoNetworks / docusaurus-openapi-docs

🦝 OpenAPI plugin for generating API reference docs in Docusaurus v3.
https://docusaurus-openapi.tryingpan.dev
MIT License
632 stars 216 forks source link

Missing information in the API key value in the Authorization header in all the sample codes #881

Open JaimeOVasconcelos opened 1 month ago

JaimeOVasconcelos commented 1 month ago

Describe the bug

In the code samples, we find Authorizationas <API_KEY_VALUE>. However, when we use JWT, the <API_KEY_VALUE> requires a prefix (JWT). That is not clear in the code sample, and our clients are stumbling on it.

Screenshot 2024-07-05 at 18 00 51

Expected behavior

Show the expected syntax for the Authorization header value.

Current behavior

The current value that is shown is not sufficient.

Possible solution

a) Add a configuration to add a prefix:

b) Or, add a configuration to set a text instead of the default .

Screenshots

Screenshot 2024-07-05 at 18 00 51

Context

Our clients have difficulty in understanding the syntax of the authentication header due to the missing JWT.

Your Environment

Version used: Plugin version is 2.1.3 Environment name and version: Chrome 123.0.6312.124, node.js 20.12.2 Operating System and version: Mac

sserrata commented 1 month ago

Hi @JaimeOVasconcelos have you tried to solve this using swizzle?

jaimevasco69 commented 1 month ago

Hey @sserrata! No, I didn't try to swizzle. I've opted to add a JavaScript script that does the trick. The bug is to let you guys know about it, and maybe incorporate new configurations in future improvements.