@@ -549,7 +549,7 @@ export default class ApiRequest extends LitElement {
549
549
</ div >
550
550
< div class ="param-type "> ${ paramSchema . type } </ div >
551
551
</ td >
552
- < td style ="${ fieldType === 'object' ? 'width:100%; padding:0;' : 'width:160px;' } min-width:100px; ">
552
+ < td style ="${ fieldType === 'object' ? 'width:100%; padding:0;' : 'width:160px;' } min-width:100px; " colspan =" ${ fieldType === 'object' ? 2 : 1 } " >
553
553
${ fieldType === 'array'
554
554
? fieldSchema . items . format === 'binary'
555
555
? html `
@@ -605,7 +605,7 @@ export default class ApiRequest extends LitElement {
605
605
</ div >
606
606
</ div >
607
607
${ html `
608
- < div class ="tab-content col " data-tab = 'model ' style ="display:none; padding:0 10px ; width:100%; ">
608
+ < div class ="tab-content col " data-tab = 'model ' style ="display:${ this . activeSchemaTab === 'model' ? 'block' : ' none' } ; padding-left:5px ; width:100%; ">
609
609
< schema-tree
610
610
.data = '${ formdataPartSchema } '
611
611
schema-expand-level = "${ this . schemaExpandLevel } "
@@ -614,7 +614,7 @@ export default class ApiRequest extends LitElement {
614
614
</ div > `
615
615
}
616
616
${ html `
617
- < div class ="tab-content col " data-tab = 'example ' style ="display:block; padding:0 10px ; width:100% ">
617
+ < div class ="tab-content col " data-tab = 'example ' style ="display:${ this . activeSchemaTab === 'example' ? ' block' : 'none' } ; padding-left:5px ; width:100% ">
618
618
< textarea
619
619
class = "textarea "
620
620
style = "width:100%; border:none; resize:vertical; "
@@ -643,27 +643,35 @@ export default class ApiRequest extends LitElement {
643
643
} `
644
644
}
645
645
</ td >
646
- < td >
647
- < div class ="param-constraint ">
648
- ${ paramSchema . default || paramSchema . constrain || paramSchema . allowedValues
649
- ? html `
650
- < div class ="param-constraint ">
651
- ${ paramSchema . default ? html `< span style ="font-weight:bold "> Default: </ span > ${ paramSchema . default } < br /> ` : '' }
652
- ${ paramSchema . constrain ? html `${ paramSchema . constrain } < br /> ` : '' }
653
- ${ paramSchema . allowedValues ? html `< span style ="font-weight:bold "> Allowed: </ span > ${ paramSchema . allowedValues } ` : '' }
654
- </ div > `
655
- : ''
656
- }
657
- </ div >
658
- </ td >
659
- </ tr >
660
- < tr >
661
- ${ this . allowTry === 'true' ? html `< td style ="border:none "> </ td > ` : '' }
662
- < td colspan ="2 " style ="border:none; margin-top:0; padding:0 5px 8px 5px; ">
663
- < span class ="m-markdown-small "> ${ unsafeHTML ( marked ( fieldSchema . description || '' ) ) } </ span >
664
- </ td >
646
+ ${ fieldType === 'object'
647
+ ? ''
648
+ : html `
649
+ < td >
650
+ < div class ="param-constraint ">
651
+ ${ paramSchema . default || paramSchema . constrain || paramSchema . allowedValues
652
+ ? html `
653
+ < div class ="param-constraint ">
654
+ ${ paramSchema . default ? html `< span style ="font-weight:bold "> Default: </ span > ${ paramSchema . default } < br /> ` : '' }
655
+ ${ paramSchema . constrain ? html `${ paramSchema . constrain } < br /> ` : '' }
656
+ ${ paramSchema . allowedValues ? html `< span style ="font-weight:bold "> Allowed: </ span > ${ paramSchema . allowedValues } ` : '' }
657
+ </ div > `
658
+ : ''
659
+ }
660
+ </ div >
661
+ </ td > `
662
+ }
665
663
</ tr >
666
- ` ) ;
664
+ ${ fieldType === 'object'
665
+ ? ''
666
+ : html `
667
+ < tr >
668
+ ${ this . allowTry === 'true' ? html `< td style ="border:none "> </ td > ` : '' }
669
+ < td colspan ="2 " style ="border:none; margin-top:0; padding:0 5px 8px 5px; ">
670
+ < span class ="m-markdown-small "> ${ unsafeHTML ( marked ( fieldSchema . description || '' ) ) } </ span >
671
+ </ td >
672
+ </ tr >
673
+ `
674
+ } `) ;
667
675
}
668
676
return html `
669
677
< table style ="width:100%; " class ="m-table ">
0 commit comments