@@ -16,7 +16,6 @@ export default class ApiResponse extends LitElement {
16
16
this . selectedStatus = '' ;
17
17
this . headersForEachRespStatus = { } ;
18
18
this . mimeResponsesForEachStatus = { } ;
19
- // this.activeSchemaTab = this.defaultSchemaTab === 'model' ? 'model' : 'example';
20
19
this . activeSchemaTab = 'model' ;
21
20
}
22
21
@@ -59,7 +58,9 @@ export default class ApiResponse extends LitElement {
59
58
}
60
59
.read-mode {
61
60
padding-top : 24px ;
62
- border-top : 1px dotted var (--border-color );
61
+ margin-top : 12px ;
62
+ border-top : 1px dashed var (--border-color );
63
+
63
64
}
64
65
</ style >
65
66
< div class ="col regular-font response-panel ${ this . renderStyle === 'read' ? 'read-mode' : 'view-mode' } ">
@@ -77,10 +78,9 @@ export default class ApiResponse extends LitElement {
77
78
parser : { type : Object } ,
78
79
schemaStyle : { type : String , attribute : 'schema-style' } ,
79
80
renderStyle : { type : String , attribute : 'render-style' } ,
80
- defaultSchemaTab : { type : String , attribute : 'default-schema-tab' } ,
81
81
selectedStatus : { type : String } ,
82
82
selectedMimeType : { type : String } ,
83
- activeSchemaTab : { type : String } ,
83
+ activeSchemaTab : { type : String , attribute : 'active-schema-tab' } ,
84
84
} ;
85
85
}
86
86
@@ -152,14 +152,8 @@ export default class ApiResponse extends LitElement {
152
152
: html `
153
153
< div class ="tab-panel col ">
154
154
< div class ="tab-buttons row " >
155
- ${ this . defaultSchemaTab === 'model'
156
- ? html `
157
- < button class ="tab-btn ${ this . activeSchemaTab === 'model' ? 'active' : '' } " data-tab = 'model ' @click ="${ ( e ) => { this . activeSchemaTab = e . target . dataset . tab ; } } " > MODEL</ button >
158
- < button class ="tab-btn ${ this . activeSchemaTab === 'example' ? 'active' : '' } " data-tab = 'example ' @click ="${ ( e ) => { this . activeSchemaTab = e . target . dataset . tab ; } } "> EXAMPLE </ button > `
159
- : html `
160
- < button class ="tab-btn ${ this . activeSchemaTab === 'example' ? 'active' : '' } " data-tab = 'example ' @click ="${ ( e ) => { this . activeSchemaTab = e . target . dataset . tab ; } } " > EXAMPLE </ button >
161
- < button class ="tab-btn ${ this . activeSchemaTab === 'model' ? 'active' : '' } " data-tab = 'model ' @click ="${ ( e ) => { this . activeSchemaTab = e . target . dataset . tab ; } } "> MODEL</ button > `
162
- }
155
+ < button class ="tab-btn ${ this . activeSchemaTab === 'model' ? 'active' : '' } " data-tab = 'model ' @click ="${ ( e ) => { this . activeSchemaTab = e . target . dataset . tab ; } } " > MODEL</ button >
156
+ < button class ="tab-btn ${ this . activeSchemaTab === 'example' ? 'active' : '' } " data-tab = 'example ' @click ="${ ( e ) => { this . activeSchemaTab = e . target . dataset . tab ; } } "> EXAMPLE </ button >
163
157
< div style ="flex:1 "> </ div >
164
158
${ Object . keys ( this . mimeResponsesForEachStatus [ status ] ) . length === 1
165
159
? html `< span class ='small-font-size gray-text ' style ='align-self:center; margin-top:8px; '> ${ Object . keys ( this . mimeResponsesForEachStatus [ status ] ) [ 0 ] } </ span > `
0 commit comments