-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathopenapi-explorer+2.4.799.patch
More file actions
40 lines (40 loc) · 2.84 KB
/
Copy pathopenapi-explorer+2.4.799.patch
File metadata and controls
40 lines (40 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/node_modules/openapi-explorer/dist/lib/utils/schema-utils.js b/node_modules/openapi-explorer/dist/lib/utils/schema-utils.js
--- a/node_modules/openapi-explorer/dist/lib/utils/schema-utils.js
+++ b/node_modules/openapi-explorer/dist/lib/utils/schema-utils.js
@@ -514,11 +514,14 @@
'🆁': schema.readOnly && '🆁',
'🆆': schema.writeOnly && '🆆'
},
- '::link': arrayItemsSchema.title || schema.title || '',
+ '::link': (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.title) || schema.title || '',
'::circular': !!schema.circularReference,
'::type': 'array',
// Array properties are read from the ::props object instead of reading from the keys of this object
- '::props': schemaInObjectNotation(Object.assign({}, schema, arrayItemsSchema, {
+ // Use type: undefined to prevent schema recursion by passing array from the parent to the next loop, matching the single-type-array branch below.
+ '::props': schemaInObjectNotation(Object.assign({}, schema, {
+ type: undefined
+ }, arrayItemsSchema, {
description: schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description)
}), options, level + 1),
'::deprecated': schema.deprecated || false,
diff --git a/node_modules/openapi-explorer/dist/es/utils/schema-utils.js b/node_modules/openapi-explorer/dist/es/utils/schema-utils.js
--- a/node_modules/openapi-explorer/dist/es/utils/schema-utils.js
+++ b/node_modules/openapi-explorer/dist/es/utils/schema-utils.js
@@ -505,11 +505,14 @@
'🆁': schema.readOnly && '🆁',
'🆆': schema.writeOnly && '🆆'
},
- '::link': arrayItemsSchema.title || schema.title || '',
+ '::link': (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.title) || schema.title || '',
'::circular': !!schema.circularReference,
'::type': 'array',
// Array properties are read from the ::props object instead of reading from the keys of this object
- '::props': schemaInObjectNotation(Object.assign({}, schema, arrayItemsSchema, {
+ // Use type: undefined to prevent schema recursion by passing array from the parent to the next loop, matching the single-type-array branch below.
+ '::props': schemaInObjectNotation(Object.assign({}, schema, {
+ type: undefined
+ }, arrayItemsSchema, {
description: schema.description || (arrayItemsSchema === null || arrayItemsSchema === void 0 ? void 0 : arrayItemsSchema.description)
}), options, level + 1),
'::deprecated': schema.deprecated || false,