openapi-explorer 0.9.317 → 0.9.323
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.
|
@@ -13,10 +13,8 @@ export function getTypeInfo(schema) {
|
|
|
13
13
|
let dataType = '';
|
|
14
14
|
let constraint = '';
|
|
15
15
|
|
|
16
|
-
if (schema
|
|
17
|
-
|
|
18
|
-
const schemaNode = schema.$ref.substring(n + 1);
|
|
19
|
-
dataType = `{recursive: ${schemaNode}} `;
|
|
16
|
+
if (schema.circularReference) {
|
|
17
|
+
dataType = `{recursive: ${schema.circularReference.name}} `;
|
|
20
18
|
} else if (schema.type) {
|
|
21
19
|
const arraySchema = Array.isArray(schema.type) ? schema.type : typeof schema.type === 'string' ? schema.type.split('┃') : schema.type;
|
|
22
20
|
dataType = Array.isArray(arraySchema) ? arraySchema.filter(s => s !== 'null').join('┃') : schema.type;
|
|
@@ -42,14 +40,7 @@ export function getTypeInfo(schema) {
|
|
|
42
40
|
allowedValues: '',
|
|
43
41
|
arrayType: '',
|
|
44
42
|
html: ''
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
if (info.type === '{recursive}') {
|
|
48
|
-
info.description = schema.$ref.substring(schema.$ref.lastIndexOf('/') + 1);
|
|
49
|
-
} else if (info.type === IS_MISSING_TYPE_INFO_TYPE) {
|
|
50
|
-
info.description = info.description || '';
|
|
51
|
-
} // Set Allowed Values
|
|
52
|
-
|
|
43
|
+
}; // Set Allowed Values
|
|
53
44
|
|
|
54
45
|
info.allowedValues = Array.isArray(schema.enum) ? schema.enum.join('┃') : '';
|
|
55
46
|
|
|
@@ -27,10 +27,8 @@ function getTypeInfo(schema) {
|
|
|
27
27
|
let dataType = '';
|
|
28
28
|
let constraint = '';
|
|
29
29
|
|
|
30
|
-
if (schema
|
|
31
|
-
|
|
32
|
-
const schemaNode = schema.$ref.substring(n + 1);
|
|
33
|
-
dataType = `{recursive: ${schemaNode}} `;
|
|
30
|
+
if (schema.circularReference) {
|
|
31
|
+
dataType = `{recursive: ${schema.circularReference.name}} `;
|
|
34
32
|
} else if (schema.type) {
|
|
35
33
|
const arraySchema = Array.isArray(schema.type) ? schema.type : typeof schema.type === 'string' ? schema.type.split('┃') : schema.type;
|
|
36
34
|
dataType = Array.isArray(arraySchema) ? arraySchema.filter(s => s !== 'null').join('┃') : schema.type;
|
|
@@ -56,14 +54,7 @@ function getTypeInfo(schema) {
|
|
|
56
54
|
allowedValues: '',
|
|
57
55
|
arrayType: '',
|
|
58
56
|
html: ''
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
if (info.type === '{recursive}') {
|
|
62
|
-
info.description = schema.$ref.substring(schema.$ref.lastIndexOf('/') + 1);
|
|
63
|
-
} else if (info.type === IS_MISSING_TYPE_INFO_TYPE) {
|
|
64
|
-
info.description = info.description || '';
|
|
65
|
-
} // Set Allowed Values
|
|
66
|
-
|
|
57
|
+
}; // Set Allowed Values
|
|
67
58
|
|
|
68
59
|
info.allowedValues = Array.isArray(schema.enum) ? schema.enum.join('┃') : '';
|
|
69
60
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-explorer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.323",
|
|
4
4
|
"description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
|
|
5
5
|
"author": "Rhosys Developers <developers@rhosys.ch>",
|
|
6
6
|
"repository": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"marked": "^4.0.16",
|
|
57
57
|
"mime-db": "^1.52.0",
|
|
58
58
|
"openapi-data-validator": "^2.0.40",
|
|
59
|
-
"openapi-resolver": "^4.0.
|
|
59
|
+
"openapi-resolver": "^4.0.27",
|
|
60
60
|
"prismjs": "^1.23.0",
|
|
61
61
|
"regex-to-strings": "^2.0.3",
|
|
62
62
|
"xml-but-prettier": "^1.0.1"
|