openapi-explorer 2.2.734 → 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.
@@ -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 => {
|
@@ -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.
|
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",
|