openapi-explorer 2.2.706 → 2.2.710

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -437,8 +437,6 @@ export default class OpenApiExplorer extends LitElement {
437
437
  authorizationToken = `Basic ${btoa(authorizationToken)}`;
438
438
  } else if (authorizationToken && securityObj.scheme && securityObj.scheme.toLowerCase() === 'bearer') {
439
439
  authorizationToken = `Bearer ${authorizationToken}`;
440
- } else {
441
- authorizationToken = null;
442
440
  }
443
441
  securityObj.clientId = clientId && clientId.trim();
444
442
  securityObj.clientSecret = clientSecret && clientSecret.trim();
@@ -488,7 +488,7 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
488
488
  } else if (v === 'array') {
489
489
  multiTypeOptions[`::OPTION~${i + 1}`] = {
490
490
  '::title': schema.title || '',
491
- '::description': schema.description || '',
491
+ '::description': schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description) || '',
492
492
  '::flags': {
493
493
  '🆁': schema.readOnly && '🆁',
494
494
  '🆆': schema.writeOnly && '🆆'
@@ -496,8 +496,9 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
496
496
  '::link': arrayItemsSchema.title || schema.title || '',
497
497
  '::type': 'array',
498
498
  // Array properties are read from the ::props object instead of reading from the keys of this object
499
- // '::props': schemaInObjectNotation(Object.assign({ deprecated: schema.deprecated, readOnly: schema.readOnly, writeOnly: schema.writeOnly }, arrayItemsSchema), options, (level + 1)),
500
- '::props': schemaInObjectNotation(Object.assign({}, schema, arrayItemsSchema), options, level + 1),
499
+ '::props': schemaInObjectNotation(Object.assign({}, schema, arrayItemsSchema, {
500
+ description: schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description)
501
+ }), options, level + 1),
501
502
  '::deprecated': schema.deprecated || false,
502
503
  '::metadata': metadata
503
504
  };
@@ -544,7 +545,7 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
544
545
  '::type': ''
545
546
  };
546
547
  obj['::title'] = schema.title || '';
547
- obj['::description'] = schema.description || (arrayItemsSchema !== null && arrayItemsSchema !== void 0 && arrayItemsSchema.description ? `array<${arrayItemsSchema.description}>` : '');
548
+ obj['::description'] = schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description) || '';
548
549
  obj['::flags'] = {
549
550
  '🆁': schema.readOnly && '🆁',
550
551
  '🆆': schema.writeOnly && '🆆'
@@ -557,7 +558,9 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
557
558
  // Use type: undefined to prevent schema recursion by passing array from the parent to the next loop. arrayItemsSchema should have had type defined but it doesn't.
558
559
  obj['::props'] = schemaInObjectNotation(Object.assign({}, schema, {
559
560
  type: undefined
560
- }, arrayItemsSchema), options, level + 1);
561
+ }, arrayItemsSchema, {
562
+ description: obj['::description']
563
+ }), options, level + 1);
561
564
  if (arrayItemsSchema !== null && arrayItemsSchema !== void 0 && arrayItemsSchema.items) {
562
565
  obj['::array-type'] = arrayItemsSchema.items.type;
563
566
  }
@@ -443,8 +443,6 @@ class OpenApiExplorer extends _lit.LitElement {
443
443
  authorizationToken = `Basic ${btoa(authorizationToken)}`;
444
444
  } else if (authorizationToken && securityObj.scheme && securityObj.scheme.toLowerCase() === 'bearer') {
445
445
  authorizationToken = `Bearer ${authorizationToken}`;
446
- } else {
447
- authorizationToken = null;
448
446
  }
449
447
  securityObj.clientId = clientId && clientId.trim();
450
448
  securityObj.clientSecret = clientSecret && clientSecret.trim();
@@ -497,7 +497,7 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
497
497
  } else if (v === 'array') {
498
498
  multiTypeOptions[`::OPTION~${i + 1}`] = {
499
499
  '::title': schema.title || '',
500
- '::description': schema.description || '',
500
+ '::description': schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description) || '',
501
501
  '::flags': {
502
502
  '🆁': schema.readOnly && '🆁',
503
503
  '🆆': schema.writeOnly && '🆆'
@@ -505,8 +505,9 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
505
505
  '::link': arrayItemsSchema.title || schema.title || '',
506
506
  '::type': 'array',
507
507
  // Array properties are read from the ::props object instead of reading from the keys of this object
508
- // '::props': schemaInObjectNotation(Object.assign({ deprecated: schema.deprecated, readOnly: schema.readOnly, writeOnly: schema.writeOnly }, arrayItemsSchema), options, (level + 1)),
509
- '::props': schemaInObjectNotation(Object.assign({}, schema, arrayItemsSchema), options, level + 1),
508
+ '::props': schemaInObjectNotation(Object.assign({}, schema, arrayItemsSchema, {
509
+ description: schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description)
510
+ }), options, level + 1),
510
511
  '::deprecated': schema.deprecated || false,
511
512
  '::metadata': metadata
512
513
  };
@@ -553,7 +554,7 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
553
554
  '::type': ''
554
555
  };
555
556
  obj['::title'] = schema.title || '';
556
- obj['::description'] = schema.description || (arrayItemsSchema !== null && arrayItemsSchema !== void 0 && arrayItemsSchema.description ? `array<${arrayItemsSchema.description}>` : '');
557
+ obj['::description'] = schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description) || '';
557
558
  obj['::flags'] = {
558
559
  '🆁': schema.readOnly && '🆁',
559
560
  '🆆': schema.writeOnly && '🆆'
@@ -566,7 +567,9 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
566
567
  // Use type: undefined to prevent schema recursion by passing array from the parent to the next loop. arrayItemsSchema should have had type defined but it doesn't.
567
568
  obj['::props'] = schemaInObjectNotation(Object.assign({}, schema, {
568
569
  type: undefined
569
- }, arrayItemsSchema), options, level + 1);
570
+ }, arrayItemsSchema, {
571
+ description: obj['::description']
572
+ }), options, level + 1);
570
573
  if (arrayItemsSchema !== null && arrayItemsSchema !== void 0 && arrayItemsSchema.items) {
571
574
  obj['::array-type'] = arrayItemsSchema.items.type;
572
575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "2.2.706",
3
+ "version": "2.2.710",
4
4
  "description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
5
5
  "author": "Authress Developers <developers@authress.io>",
6
6
  "type": "module",