File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/CodeSnippets Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,17 @@ function CodeSnippets({ postman, codeSamples }: Props) {
5454
5555 const auth = useTypedSelector ( ( state : any ) => state . auth ) ;
5656 const clonedAuth = cloneDeep ( auth ) ;
57+ console . log ( clonedAuth ) ;
5758 let placeholder : string ;
5859
5960 function cleanCredentials ( obj : any ) {
6061 for ( const key in obj ) {
6162 if ( typeof obj [ key ] === "object" && obj [ key ] !== null ) {
6263 // use name as placeholder if exists
63- placeholder = clonedAuth ?. options ?. [ key ] ?. [ 0 ] ?. name ;
64+ const comboAuthId = Object . keys ( obj ) . join ( " and " ) ;
65+ const authOptions =
66+ clonedAuth ?. options ?. [ key ] ?? clonedAuth ?. options ?. [ comboAuthId ] ;
67+ placeholder = authOptions ?. [ 0 ] ?. name ;
6468 obj [ key ] = cleanCredentials ( obj [ key ] ) ;
6569 } else {
6670 obj [ key ] = `<${ placeholder ?? key } >` ;
You can’t perform that action at this time.
0 commit comments