openapi-explorer 2.2.733 → 2.2.737

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.
@@ -888,8 +888,8 @@ export default class ApiRequest extends LitElement {
888
888
  request: fetchRequest
889
889
  }
890
890
  };
891
- document.dispatchEvent(new CustomEvent('after-try', responseEvent));
892
- document.dispatchEvent(new CustomEvent('response', responseEvent));
891
+ this.dispatchEvent(new CustomEvent('after-try', responseEvent));
892
+ this.dispatchEvent(new CustomEvent('response', responseEvent));
893
893
  }
894
894
  this.requestUpdate();
895
895
  }
@@ -21,7 +21,10 @@ export function getTypeInfo(parameter, options = {
21
21
  let format = schema.format || ((_schema$items = schema.items) === null || _schema$items === void 0 ? void 0 : _schema$items.format) || '';
22
22
  if (schema.circularReference) {
23
23
  dataType = `{recursive: ${schema.circularReference.name}} `;
24
- } else if (schema.type) {
24
+ } else if (schema.type || schema.const) {
25
+ if (!schema.type && schema.const) {
26
+ schema.type = 'const';
27
+ }
25
28
  const arraySchema = Array.isArray(schema.type) ? schema.type : typeof schema.type === 'string' ? schema.type.split('┃') : schema.type;
26
29
  dataType = Array.isArray(arraySchema) ? arraySchema.filter(s => s !== 'null' || options.includeNulls).join('┃') : schema.type;
27
30
  ['string', 'number'].forEach(type => {
@@ -893,8 +893,8 @@ class ApiRequest extends _lit.LitElement {
893
893
  request: fetchRequest
894
894
  }
895
895
  };
896
- document.dispatchEvent(new CustomEvent('after-try', responseEvent));
897
- document.dispatchEvent(new CustomEvent('response', responseEvent));
896
+ this.dispatchEvent(new CustomEvent('after-try', responseEvent));
897
+ this.dispatchEvent(new CustomEvent('response', responseEvent));
898
898
  }
899
899
  this.requestUpdate();
900
900
  }
@@ -30,7 +30,10 @@ function getTypeInfo(parameter, options = {
30
30
  let format = schema.format || ((_schema$items = schema.items) === null || _schema$items === void 0 ? void 0 : _schema$items.format) || '';
31
31
  if (schema.circularReference) {
32
32
  dataType = `{recursive: ${schema.circularReference.name}} `;
33
- } else if (schema.type) {
33
+ } else if (schema.type || schema.const) {
34
+ if (!schema.type && schema.const) {
35
+ schema.type = 'const';
36
+ }
34
37
  const arraySchema = Array.isArray(schema.type) ? schema.type : typeof schema.type === 'string' ? schema.type.split('┃') : schema.type;
35
38
  dataType = Array.isArray(arraySchema) ? arraySchema.filter(s => s !== 'null' || options.includeNulls).join('┃') : schema.type;
36
39
  ['string', 'number'].forEach(type => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "2.2.733",
3
+ "version": "2.2.737",
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",