@@ -274,11 +274,11 @@ export default class ApiRequest extends LitElement {
274
274
for ( const param of filteredParams ) {
275
275
const [ declaredParamSchema , serializeStyle , mimeTypeElem ] = getSchemaFromParam ( param ) ;
276
276
if ( ! declaredParamSchema ) {
277
- continue ;
277
+ continue ; // eslint-disable-line no-continue
278
278
}
279
279
const paramSchema = getTypeInfo ( declaredParamSchema ) ;
280
280
if ( ! paramSchema ) {
281
- continue ;
281
+ continue ; // eslint-disable-line no-continue
282
282
}
283
283
const schemaAsObj = schemaInObjectNotation ( declaredParamSchema , { } ) ;
284
284
// let exampleVal = '';
@@ -509,7 +509,7 @@ export default class ApiRequest extends LitElement {
509
509
let reqBodyExampleHtml = '' ;
510
510
511
511
const requestBodyTypes = [ ] ;
512
- const content = this . request_body . content ;
512
+ const { content } = this . request_body ;
513
513
for ( const mimeType in content ) {
514
514
requestBodyTypes . push ( {
515
515
mimeType,
@@ -709,7 +709,7 @@ export default class ApiRequest extends LitElement {
709
709
< div style ="width:24px; background-color:var(--light-border-color) ">
710
710
< div class ="row " style ="flex-direction:row-reverse; width:160px; height:24px; transform:rotate(270deg) translateX(-160px); transform-origin:top left; display:block; " @click ="${ ( e ) => {
711
711
if ( e . target . classList . contains ( 'v-tab-btn' ) ) {
712
- const tab = e . target . dataset . tab ;
712
+ const { tab } = e . target . dataset ;
713
713
if ( tab ) {
714
714
const tabPanelEl = e . target . closest ( '.tab-panel' ) ;
715
715
const selectedTabBtnEl = tabPanelEl . querySelector ( `.v-tab-btn[data-tab="${ tab } "]` ) ;
@@ -1082,8 +1082,7 @@ export default class ApiRequest extends LitElement {
1082
1082
queryParam . append ( el . dataset . pname , el . value ) ;
1083
1083
}
1084
1084
} else {
1085
- const paramSerializeStyle = el . dataset . paramSerializeStyle ;
1086
- const paramSerializeExplode = el . dataset . paramSerializeExplode ;
1085
+ const { paramSerializeStyle, paramSerializeExplode } = el . dataset ;
1087
1086
let vals = ( ( el . value && Array . isArray ( el . value ) ) ? el . value : [ ] ) ;
1088
1087
vals = Array . isArray ( vals ) ? vals . filter ( ( v ) => v !== '' ) : [ ] ;
1089
1088
if ( vals . length > 0 ) {
@@ -1112,8 +1111,7 @@ export default class ApiRequest extends LitElement {
1112
1111
const queryParam = new URLSearchParams ( ) ;
1113
1112
try {
1114
1113
let queryParamObj = { } ;
1115
- const paramSerializeStyle = el . dataset . paramSerializeStyle ;
1116
- const paramSerializeExplode = el . dataset . paramSerializeExplode ;
1114
+ const { paramSerializeStyle, paramSerializeExplode } = el . dataset . paramSerializeStyle ;
1117
1115
queryParamObj = Object . assign ( queryParamObj , JSON . parse ( el . value . replace ( / \s + / g, ' ' ) ) ) ;
1118
1116
if ( el . dataset . paramAllowReserved === 'true' ) {
1119
1117
queryParamsWithReservedCharsAllowed . push ( el . dataset . pname ) ;
@@ -1283,7 +1281,7 @@ export default class ApiRequest extends LitElement {
1283
1281
} else if ( / ^ a u d i o \/ | ^ i m a g e \/ | ^ v i d e o \/ | ^ f o n t \/ | t a r $ | z i p $ | 7 z $ | r t f $ | m s w o r d $ | e x c e l $ | \/ p d f $ | \/ o c t e t - s t r e a m $ / . test ( requestBodyType ) ) {
1284
1282
const bodyParamFileEl = requestPanelEl . querySelector ( '.request-body-param-file' ) ;
1285
1283
if ( bodyParamFileEl ?. files [ 0 ] ) {
1286
- fetchOptions . body = bodyParamFileEl . files [ 0 ] ;
1284
+ fetchOptions . body = bodyParamFileEl . files [ 0 ] ; // eslint-disable-line prefer-destructuring
1287
1285
curlData = ` --data-binary @${ bodyParamFileEl . files [ 0 ] . name } \\\n` ;
1288
1286
}
1289
1287
} else if ( requestBodyType . includes ( 'json' ) || requestBodyType . includes ( 'xml' ) || requestBodyType . includes ( 'text' ) ) {
0 commit comments