openapi-explorer 2.4.820 → 2.4.834

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.
@@ -360,7 +360,7 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
360
360
  // If allOf is an array of multiple elements, then all the keys makes a single object
361
361
  const objWithAllProps = {};
362
362
  allOf.map((v, i) => {
363
- if (v.type === 'object' || v.properties || v.allOf || v.anyOf || v.oneOf) {
363
+ if (v.type === 'object' || v.properties || v.patternProperties || v.allOf || v.anyOf || v.oneOf) {
364
364
  const propSuffix = (v.anyOf || v.oneOf) && i > 0 ? i : '';
365
365
  const partialObj = schemaInObjectNotation(v, options, level + 1, propSuffix);
366
366
  Object.assign(objWithAllProps, partialObj);
@@ -386,7 +386,7 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
386
386
  let writeOnly = true;
387
387
  let readOnly = true;
388
388
  (anyOf || oneOf || []).forEach((v, index) => {
389
- if (v.type === 'object' || v.properties || v.allOf || v.anyOf || v.oneOf || v.type === 'array' || v.items) {
389
+ if (v.type === 'object' || v.properties || v.patternProperties || v.allOf || v.anyOf || v.oneOf || v.type === 'array' || v.items) {
390
390
  const partialObj = schemaInObjectNotation(v, options);
391
391
  if (partialObj) {
392
392
  var _partialObj$Flags, _partialObj$Flags2;
@@ -493,6 +493,9 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
493
493
  objTypeOption[key] = schemaInObjectNotation(schemaProperties[key], options, level + 1);
494
494
  }
495
495
  }
496
+ for (const key in schemaPatternProperties) {
497
+ objTypeOption[`<pattern: ${key}>`] = schemaInObjectNotation(schemaPatternProperties[key], options, level + 1);
498
+ }
496
499
  if (schema.additionalProperties) {
497
500
  objTypeOption['<any-key>'] = schemaInObjectNotation(schema.additionalProperties, options);
498
501
  }
@@ -522,7 +525,7 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
522
525
  }
523
526
  return obj;
524
527
  }
525
- if (propertyType === 'object' || schemaProperties || schema.circularReference) {
528
+ if (propertyType === 'object' || schemaProperties || schemaPatternProperties || schema.circularReference) {
526
529
  const obj = {
527
530
  '::type': ''
528
531
  };
@@ -369,7 +369,7 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
369
369
  // If allOf is an array of multiple elements, then all the keys makes a single object
370
370
  const objWithAllProps = {};
371
371
  allOf.map((v, i) => {
372
- if (v.type === 'object' || v.properties || v.allOf || v.anyOf || v.oneOf) {
372
+ if (v.type === 'object' || v.properties || v.patternProperties || v.allOf || v.anyOf || v.oneOf) {
373
373
  const propSuffix = (v.anyOf || v.oneOf) && i > 0 ? i : '';
374
374
  const partialObj = schemaInObjectNotation(v, options, level + 1, propSuffix);
375
375
  Object.assign(objWithAllProps, partialObj);
@@ -395,7 +395,7 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
395
395
  let writeOnly = true;
396
396
  let readOnly = true;
397
397
  (anyOf || oneOf || []).forEach((v, index) => {
398
- if (v.type === 'object' || v.properties || v.allOf || v.anyOf || v.oneOf || v.type === 'array' || v.items) {
398
+ if (v.type === 'object' || v.properties || v.patternProperties || v.allOf || v.anyOf || v.oneOf || v.type === 'array' || v.items) {
399
399
  const partialObj = schemaInObjectNotation(v, options);
400
400
  if (partialObj) {
401
401
  var _partialObj$Flags, _partialObj$Flags2;
@@ -502,6 +502,9 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
502
502
  objTypeOption[key] = schemaInObjectNotation(schemaProperties[key], options, level + 1);
503
503
  }
504
504
  }
505
+ for (const key in schemaPatternProperties) {
506
+ objTypeOption[`<pattern: ${key}>`] = schemaInObjectNotation(schemaPatternProperties[key], options, level + 1);
507
+ }
505
508
  if (schema.additionalProperties) {
506
509
  objTypeOption['<any-key>'] = schemaInObjectNotation(schema.additionalProperties, options);
507
510
  }
@@ -531,7 +534,7 @@ function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '') {
531
534
  }
532
535
  return obj;
533
536
  }
534
- if (propertyType === 'object' || schemaProperties || schema.circularReference) {
537
+ if (propertyType === 'object' || schemaProperties || schemaPatternProperties || schema.circularReference) {
535
538
  const obj = {
536
539
  '::type': ''
537
540
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "2.4.820",
3
+ "version": "2.4.834",
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",