Add maskCredentials as a pluginOption#1212
Conversation
|
Thanks @Devon-White! As a reminder, swizzling is another option for overriding the credential masking behavior but I believe there is definitely space for your proposed feature. I think the key is that credential masking will be |
|
Visit the preview URL for this PR (updated for commit 0da0a2f): https://docusaurus-openapi-36b86--pr1212-f50qxc17.web.app (expires Wed, 27 Aug 2025 14:15:36 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: bf293780ee827f578864d92193b8c2866acd459f |
|
@sserrata sorry to be pinging on a old PR, was just wondering if you had a estimate on when this new addition will be added to a new release! Thanks for for reviewing and approving! :) Edit: Looks like the main released was skipped, but canary version was released: https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/actions/runs/16571851556/job/47222835499 |
* Add maskCredentials as a pluginOption * fix formatting to be consistent
|
When will this feature be available in a new public release? |
|
Since @Devon-White's context comment in #1157 is a little buried in that thread, I'll add a quick note here for future reference and convenience: In essence, PR #1050 (released in v4.3.1) introduced the behavior of masking credentials in the code samples; the |
Description
Related issue: #1157 (second reported issue)
added
maskCredentialsas a plugin option.Motivation and Context
We have had multiple customers complain about our REST docs being "broken" because they would copy the generated code snippets that mask the API credentials. After some investigation and realizing this design was by choice, I figured I would add a plugin option to revert back to the original behavior.
Due to the number of complaints from our customers, we have gone ahead and rolled back to a older Docusaurus version (
3.6.3) & plugin version (4.3.0) as a compromise for our customers. We however would like to keep the old behavior of the plugin while also being able to benefit from the newfutureflags Docusaurus has exposed to speed up build times.The credentials will still be masked by default, but setting
maskCredentials: falsewill revert back to original behavior.How Has This Been Tested?
Locally forked, and built.
Test suite ran, and all passed.
Types of changes
Checklist