File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/react-openapi/src Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @gitbook/react-openapi ' : patch
3+ ---
4+
5+ Fix OpenAPI basic auth placeholder
Original file line number Diff line number Diff line change @@ -315,11 +315,12 @@ function getSecurityHeaders(args: {
315315 switch ( security . type ) {
316316 case 'http' : {
317317 let scheme = security . scheme ;
318+ const defaultPlaceholderValue = scheme ?. toLowerCase ( ) ?. includes ( 'basic' )
319+ ? 'username:password'
320+ : 'YOUR_SECRET_TOKEN' ;
318321 const format = resolvePrefillCodePlaceholderFromSecurityScheme ( {
319322 security : security ,
320- defaultPlaceholderValue : scheme ?. includes ( 'basic' )
321- ? 'username:password'
322- : 'YOUR_SECRET_TOKEN' ,
323+ defaultPlaceholderValue,
323324 } ) ;
324325
325326 if ( scheme ?. includes ( 'bearer' ) ) {
You can’t perform that action at this time.
0 commit comments