docusaurus-theme-openapi-docs 0.0.0-940 → 0.0.0-941
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.
|
@@ -183,6 +183,20 @@ const AnyOneOf = ({ schema, schemaType }) => {
|
|
|
183
183
|
};
|
|
184
184
|
const Properties = ({ schema, schemaType }) => {
|
|
185
185
|
const discriminator = schema.discriminator;
|
|
186
|
+
if (discriminator && !discriminator.mapping) {
|
|
187
|
+
const anyOneOf = schema.oneOf ?? schema.anyOf ?? {};
|
|
188
|
+
const inferredMapping = {};
|
|
189
|
+
Object.entries(anyOneOf).map(([_, anyOneSchema]) => {
|
|
190
|
+
// ensure discriminated property only renders once
|
|
191
|
+
if (
|
|
192
|
+
schema.properties[discriminator.propertyName] &&
|
|
193
|
+
anyOneSchema.properties[discriminator.propertyName]
|
|
194
|
+
)
|
|
195
|
+
delete anyOneSchema.properties[discriminator.propertyName];
|
|
196
|
+
return (inferredMapping[anyOneSchema.title] = anyOneSchema);
|
|
197
|
+
});
|
|
198
|
+
discriminator["mapping"] = inferredMapping;
|
|
199
|
+
}
|
|
186
200
|
if (Object.keys(schema.properties).length === 0) {
|
|
187
201
|
return react_1.default.createElement(SchemaItem_1.default, {
|
|
188
202
|
collapsible: false,
|
|
@@ -221,71 +235,143 @@ const PropertyDiscriminator = ({
|
|
|
221
235
|
if (!schema) {
|
|
222
236
|
return null;
|
|
223
237
|
}
|
|
224
|
-
if (discriminator.mapping === undefined) {
|
|
225
|
-
return react_1.default.createElement(SchemaEdge, {
|
|
226
|
-
name: name,
|
|
227
|
-
schema: schema,
|
|
228
|
-
required: required,
|
|
229
|
-
schemaName: schemaName,
|
|
230
|
-
schemaType: schemaType,
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
238
|
return react_1.default.createElement(
|
|
234
|
-
|
|
235
|
-
|
|
239
|
+
react_1.default.Fragment,
|
|
240
|
+
null,
|
|
236
241
|
react_1.default.createElement(
|
|
237
242
|
"div",
|
|
238
|
-
|
|
243
|
+
{ className: "openapi-discriminator__item openapi-schema__list-item" },
|
|
239
244
|
react_1.default.createElement(
|
|
240
|
-
"
|
|
241
|
-
|
|
245
|
+
"div",
|
|
246
|
+
null,
|
|
242
247
|
react_1.default.createElement(
|
|
243
|
-
"
|
|
244
|
-
{ className: "openapi-
|
|
245
|
-
name
|
|
246
|
-
),
|
|
247
|
-
schemaName &&
|
|
248
|
+
"span",
|
|
249
|
+
{ className: "openapi-schema__container" },
|
|
248
250
|
react_1.default.createElement(
|
|
249
|
-
"
|
|
250
|
-
{
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
"strong",
|
|
252
|
+
{
|
|
253
|
+
className: "openapi-discriminator__name openapi-schema__property",
|
|
254
|
+
},
|
|
255
|
+
name
|
|
253
256
|
),
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
257
|
+
schemaName &&
|
|
258
|
+
react_1.default.createElement(
|
|
259
|
+
"span",
|
|
260
|
+
{ className: "openapi-schema__name" },
|
|
261
|
+
" ",
|
|
262
|
+
schemaName
|
|
263
|
+
),
|
|
264
|
+
required &&
|
|
265
|
+
react_1.default.createElement("span", {
|
|
266
|
+
className: "openapi-schema__divider",
|
|
267
|
+
}),
|
|
268
|
+
required &&
|
|
269
|
+
react_1.default.createElement(
|
|
270
|
+
"span",
|
|
271
|
+
{ className: "openapi-schema__required" },
|
|
272
|
+
"required"
|
|
273
|
+
)
|
|
274
|
+
),
|
|
275
|
+
react_1.default.createElement(
|
|
276
|
+
"div",
|
|
277
|
+
{ style: { marginLeft: "1rem" } },
|
|
278
|
+
schema.description &&
|
|
279
|
+
react_1.default.createElement(Markdown, {
|
|
280
|
+
text: schema.description,
|
|
281
|
+
}),
|
|
282
|
+
(0, schema_1.getQualifierMessage)(discriminator) &&
|
|
283
|
+
react_1.default.createElement(Markdown, {
|
|
284
|
+
text: (0, schema_1.getQualifierMessage)(discriminator),
|
|
282
285
|
})
|
|
286
|
+
),
|
|
287
|
+
react_1.default.createElement(
|
|
288
|
+
DiscriminatorTabs_1.default,
|
|
289
|
+
{ className: "openapi-tabs__discriminator" },
|
|
290
|
+
Object.keys(discriminator.mapping).map((key, index) =>
|
|
291
|
+
// @ts-ignore
|
|
292
|
+
react_1.default.createElement(
|
|
293
|
+
TabItem_1.default,
|
|
294
|
+
{ key: index, label: key, value: `${index}-item-discriminator` },
|
|
295
|
+
react_1.default.createElement(SchemaNode, {
|
|
296
|
+
schema: discriminator.mapping[key],
|
|
297
|
+
schemaType: schemaType,
|
|
298
|
+
})
|
|
299
|
+
)
|
|
283
300
|
)
|
|
284
301
|
)
|
|
285
302
|
)
|
|
286
|
-
)
|
|
303
|
+
),
|
|
304
|
+
schema.properties &&
|
|
305
|
+
Object.entries(schema.properties).map(
|
|
306
|
+
([key, val]) =>
|
|
307
|
+
key !== discriminator.propertyName &&
|
|
308
|
+
react_1.default.createElement(SchemaEdge, {
|
|
309
|
+
key: key,
|
|
310
|
+
name: key,
|
|
311
|
+
schema: val,
|
|
312
|
+
required: Array.isArray(schema.required)
|
|
313
|
+
? schema.required.includes(key)
|
|
314
|
+
: false,
|
|
315
|
+
discriminator: false,
|
|
316
|
+
schemaType: schemaType,
|
|
317
|
+
})
|
|
318
|
+
)
|
|
287
319
|
);
|
|
288
320
|
};
|
|
321
|
+
const DiscriminatorNode = ({ discriminator, schema, schemaType }) => {
|
|
322
|
+
let discriminatedSchemas = {};
|
|
323
|
+
let inferredMapping = {};
|
|
324
|
+
const discriminatorProperty = schema.properties[discriminator.propertyName];
|
|
325
|
+
if (schema.allOf) {
|
|
326
|
+
const mergedSchemas = mergeAllOf(schema);
|
|
327
|
+
if (mergedSchemas.oneOf || mergedSchemas.anyOf) {
|
|
328
|
+
discriminatedSchemas = mergedSchemas.oneOf || mergedSchemas.anyOf;
|
|
329
|
+
}
|
|
330
|
+
} else if (schema.oneOf || schema.anyOf) {
|
|
331
|
+
discriminatedSchemas = schema.oneOf || schema.anyOf;
|
|
332
|
+
}
|
|
333
|
+
// Handle case where no mapping is defined
|
|
334
|
+
if (!discriminator.mapping) {
|
|
335
|
+
Object.entries(discriminatedSchemas).forEach(([_, subschema], index) => {
|
|
336
|
+
inferredMapping[subschema.title ?? `PROP${index}`] = subschema;
|
|
337
|
+
});
|
|
338
|
+
discriminator.mapping = inferredMapping;
|
|
339
|
+
}
|
|
340
|
+
// Merge sub schema discriminator property with parent
|
|
341
|
+
Object.keys(discriminator.mapping).forEach((key) => {
|
|
342
|
+
const subSchema = discriminator.mapping[key];
|
|
343
|
+
// Handle discriminated schema with allOf
|
|
344
|
+
let mergedSubSchema = {};
|
|
345
|
+
if (subSchema.allOf) {
|
|
346
|
+
mergedSubSchema = mergeAllOf(subSchema);
|
|
347
|
+
}
|
|
348
|
+
const subProperties = subSchema.properties || mergedSubSchema.properties;
|
|
349
|
+
if (subProperties[discriminator.propertyName]) {
|
|
350
|
+
schema.properties[discriminator.propertyName] = {
|
|
351
|
+
...schema.properties[discriminator.propertyName],
|
|
352
|
+
...subProperties[discriminator.propertyName],
|
|
353
|
+
};
|
|
354
|
+
if (subSchema.required && !schema.required) {
|
|
355
|
+
schema.required = subSchema.required;
|
|
356
|
+
}
|
|
357
|
+
// Avoid duplicating property
|
|
358
|
+
delete subProperties[discriminator.propertyName];
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
const name = discriminator.propertyName;
|
|
362
|
+
const schemaName = (0, schema_1.getSchemaName)(discriminatorProperty);
|
|
363
|
+
// Default case for discriminator without oneOf/anyOf/allOf
|
|
364
|
+
return react_1.default.createElement(PropertyDiscriminator, {
|
|
365
|
+
name: name,
|
|
366
|
+
schemaName: schemaName,
|
|
367
|
+
schema: schema,
|
|
368
|
+
schemaType: schemaType,
|
|
369
|
+
discriminator: discriminator,
|
|
370
|
+
required: Array.isArray(schema.required)
|
|
371
|
+
? schema.required.includes(name)
|
|
372
|
+
: schema.required,
|
|
373
|
+
});
|
|
374
|
+
};
|
|
289
375
|
const AdditionalProperties = ({ schema, schemaType }) => {
|
|
290
376
|
const additionalProperties = schema.additionalProperties;
|
|
291
377
|
if (!additionalProperties) return null;
|
|
@@ -690,6 +776,15 @@ const SchemaNode = ({ schema, schemaType }) => {
|
|
|
690
776
|
) {
|
|
691
777
|
return null;
|
|
692
778
|
}
|
|
779
|
+
if (schema.discriminator) {
|
|
780
|
+
const { discriminator } = schema;
|
|
781
|
+
return react_1.default.createElement(DiscriminatorNode, {
|
|
782
|
+
discriminator: discriminator,
|
|
783
|
+
schema: schema,
|
|
784
|
+
schemaType: schemaType,
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
// Handle allOf, oneOf, anyOf without discriminators
|
|
693
788
|
if (schema.allOf) {
|
|
694
789
|
const mergedSchemas = mergeAllOf(schema);
|
|
695
790
|
if (
|
|
@@ -723,6 +818,12 @@ const SchemaNode = ({ schema, schemaType }) => {
|
|
|
723
818
|
})
|
|
724
819
|
);
|
|
725
820
|
}
|
|
821
|
+
if (schema.oneOf || schema.anyOf) {
|
|
822
|
+
return react_1.default.createElement(AnyOneOf, {
|
|
823
|
+
schema: schema,
|
|
824
|
+
schemaType: schemaType,
|
|
825
|
+
});
|
|
826
|
+
}
|
|
726
827
|
// Handle primitives
|
|
727
828
|
if (
|
|
728
829
|
schema.type &&
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-941",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"clsx": "^1.1.1",
|
|
44
44
|
"copy-text-to-clipboard": "^3.1.0",
|
|
45
45
|
"crypto-js": "^4.1.1",
|
|
46
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
46
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-941",
|
|
47
47
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
48
48
|
"file-saver": "^2.0.5",
|
|
49
49
|
"lodash": "^4.17.20",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": ">=14"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "64f0f2dd6de011ae7970b6340fa63e41d79a9232"
|
|
75
75
|
}
|
|
@@ -184,6 +184,20 @@ const AnyOneOf: React.FC<SchemaProps> = ({ schema, schemaType }) => {
|
|
|
184
184
|
|
|
185
185
|
const Properties: React.FC<SchemaProps> = ({ schema, schemaType }) => {
|
|
186
186
|
const discriminator = schema.discriminator;
|
|
187
|
+
if (discriminator && !discriminator.mapping) {
|
|
188
|
+
const anyOneOf = schema.oneOf ?? schema.anyOf ?? {};
|
|
189
|
+
const inferredMapping = {} as any;
|
|
190
|
+
Object.entries(anyOneOf).map(([_, anyOneSchema]: [string, any]) => {
|
|
191
|
+
// ensure discriminated property only renders once
|
|
192
|
+
if (
|
|
193
|
+
schema.properties![discriminator.propertyName] &&
|
|
194
|
+
anyOneSchema.properties[discriminator.propertyName]
|
|
195
|
+
)
|
|
196
|
+
delete anyOneSchema.properties[discriminator.propertyName];
|
|
197
|
+
return (inferredMapping[anyOneSchema.title] = anyOneSchema);
|
|
198
|
+
});
|
|
199
|
+
discriminator["mapping"] = inferredMapping;
|
|
200
|
+
}
|
|
187
201
|
if (Object.keys(schema.properties as {}).length === 0) {
|
|
188
202
|
return (
|
|
189
203
|
<SchemaItem
|
|
@@ -196,6 +210,7 @@ const Properties: React.FC<SchemaProps> = ({ schema, schemaType }) => {
|
|
|
196
210
|
/>
|
|
197
211
|
);
|
|
198
212
|
}
|
|
213
|
+
|
|
199
214
|
return (
|
|
200
215
|
<>
|
|
201
216
|
{Object.entries(schema.properties as {}).map(
|
|
@@ -230,55 +245,143 @@ const PropertyDiscriminator: React.FC<SchemaEdgeProps> = ({
|
|
|
230
245
|
return null;
|
|
231
246
|
}
|
|
232
247
|
|
|
233
|
-
if (discriminator.mapping === undefined) {
|
|
234
|
-
return (
|
|
235
|
-
<SchemaEdge
|
|
236
|
-
name={name}
|
|
237
|
-
schema={schema}
|
|
238
|
-
required={required}
|
|
239
|
-
schemaName={schemaName}
|
|
240
|
-
schemaType={schemaType}
|
|
241
|
-
/>
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
248
|
return (
|
|
246
|
-
|
|
247
|
-
<div>
|
|
248
|
-
<
|
|
249
|
-
<
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
<span className="openapi-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
{
|
|
262
|
-
<Markdown text={
|
|
263
|
-
|
|
249
|
+
<>
|
|
250
|
+
<div className="openapi-discriminator__item openapi-schema__list-item">
|
|
251
|
+
<div>
|
|
252
|
+
<span className="openapi-schema__container">
|
|
253
|
+
<strong className="openapi-discriminator__name openapi-schema__property">
|
|
254
|
+
{name}
|
|
255
|
+
</strong>
|
|
256
|
+
{schemaName && (
|
|
257
|
+
<span className="openapi-schema__name"> {schemaName}</span>
|
|
258
|
+
)}
|
|
259
|
+
{required && <span className="openapi-schema__divider"></span>}
|
|
260
|
+
{required && (
|
|
261
|
+
<span className="openapi-schema__required">required</span>
|
|
262
|
+
)}
|
|
263
|
+
</span>
|
|
264
|
+
<div style={{ marginLeft: "1rem" }}>
|
|
265
|
+
{schema.description && <Markdown text={schema.description} />}
|
|
266
|
+
{getQualifierMessage(discriminator) && (
|
|
267
|
+
<Markdown text={getQualifierMessage(discriminator)} />
|
|
268
|
+
)}
|
|
269
|
+
</div>
|
|
270
|
+
<DiscriminatorTabs className="openapi-tabs__discriminator">
|
|
271
|
+
{Object.keys(discriminator.mapping).map((key, index) => (
|
|
272
|
+
// @ts-ignore
|
|
273
|
+
<TabItem
|
|
274
|
+
key={index}
|
|
275
|
+
label={key}
|
|
276
|
+
value={`${index}-item-discriminator`}
|
|
277
|
+
>
|
|
278
|
+
<SchemaNode
|
|
279
|
+
schema={discriminator.mapping[key]}
|
|
280
|
+
schemaType={schemaType}
|
|
281
|
+
/>
|
|
282
|
+
</TabItem>
|
|
283
|
+
))}
|
|
284
|
+
</DiscriminatorTabs>
|
|
264
285
|
</div>
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
286
|
+
</div>
|
|
287
|
+
{schema.properties &&
|
|
288
|
+
Object.entries(schema.properties as {}).map(
|
|
289
|
+
([key, val]: [string, any]) =>
|
|
290
|
+
key !== discriminator.propertyName && (
|
|
291
|
+
<SchemaEdge
|
|
292
|
+
key={key}
|
|
293
|
+
name={key}
|
|
294
|
+
schema={val}
|
|
295
|
+
required={
|
|
296
|
+
Array.isArray(schema.required)
|
|
297
|
+
? schema.required.includes(key)
|
|
298
|
+
: false
|
|
299
|
+
}
|
|
300
|
+
discriminator={false}
|
|
275
301
|
schemaType={schemaType}
|
|
276
302
|
/>
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
303
|
+
)
|
|
304
|
+
)}
|
|
305
|
+
</>
|
|
306
|
+
);
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
interface DiscriminatorNodeProps {
|
|
310
|
+
discriminator: any;
|
|
311
|
+
schema: SchemaObject;
|
|
312
|
+
schemaType: "request" | "response";
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const DiscriminatorNode: React.FC<DiscriminatorNodeProps> = ({
|
|
316
|
+
discriminator,
|
|
317
|
+
schema,
|
|
318
|
+
schemaType,
|
|
319
|
+
}) => {
|
|
320
|
+
let discriminatedSchemas: any = {};
|
|
321
|
+
let inferredMapping: any = {};
|
|
322
|
+
|
|
323
|
+
const discriminatorProperty = schema.properties![discriminator.propertyName];
|
|
324
|
+
|
|
325
|
+
if (schema.allOf) {
|
|
326
|
+
const mergedSchemas = mergeAllOf(schema) as SchemaObject;
|
|
327
|
+
if (mergedSchemas.oneOf || mergedSchemas.anyOf) {
|
|
328
|
+
discriminatedSchemas = mergedSchemas.oneOf || mergedSchemas.anyOf;
|
|
329
|
+
}
|
|
330
|
+
} else if (schema.oneOf || schema.anyOf) {
|
|
331
|
+
discriminatedSchemas = schema.oneOf || schema.anyOf;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Handle case where no mapping is defined
|
|
335
|
+
if (!discriminator.mapping) {
|
|
336
|
+
Object.entries(discriminatedSchemas).forEach(
|
|
337
|
+
([_, subschema]: [string, any], index) => {
|
|
338
|
+
inferredMapping[subschema.title ?? `PROP${index}`] = subschema;
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
discriminator.mapping = inferredMapping;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Merge sub schema discriminator property with parent
|
|
345
|
+
Object.keys(discriminator.mapping).forEach((key) => {
|
|
346
|
+
const subSchema = discriminator.mapping[key];
|
|
347
|
+
|
|
348
|
+
// Handle discriminated schema with allOf
|
|
349
|
+
let mergedSubSchema = {} as SchemaObject;
|
|
350
|
+
if (subSchema.allOf) {
|
|
351
|
+
mergedSubSchema = mergeAllOf(subSchema) as SchemaObject;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const subProperties = subSchema.properties || mergedSubSchema.properties;
|
|
355
|
+
if (subProperties[discriminator.propertyName]) {
|
|
356
|
+
schema.properties![discriminator.propertyName] = {
|
|
357
|
+
...schema.properties![discriminator.propertyName],
|
|
358
|
+
...subProperties[discriminator.propertyName],
|
|
359
|
+
};
|
|
360
|
+
if (subSchema.required && !schema.required) {
|
|
361
|
+
schema.required = subSchema.required;
|
|
362
|
+
}
|
|
363
|
+
// Avoid duplicating property
|
|
364
|
+
delete subProperties[discriminator.propertyName];
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
const name = discriminator.propertyName;
|
|
369
|
+
const schemaName = getSchemaName(discriminatorProperty);
|
|
370
|
+
|
|
371
|
+
// Default case for discriminator without oneOf/anyOf/allOf
|
|
372
|
+
return (
|
|
373
|
+
<PropertyDiscriminator
|
|
374
|
+
name={name}
|
|
375
|
+
schemaName={schemaName}
|
|
376
|
+
schema={schema}
|
|
377
|
+
schemaType={schemaType}
|
|
378
|
+
discriminator={discriminator}
|
|
379
|
+
required={
|
|
380
|
+
Array.isArray(schema.required)
|
|
381
|
+
? schema.required.includes(name)
|
|
382
|
+
: schema.required
|
|
383
|
+
}
|
|
384
|
+
/>
|
|
282
385
|
);
|
|
283
386
|
};
|
|
284
387
|
|
|
@@ -738,6 +841,18 @@ const SchemaNode: React.FC<SchemaProps> = ({ schema, schemaType }) => {
|
|
|
738
841
|
return null;
|
|
739
842
|
}
|
|
740
843
|
|
|
844
|
+
if (schema.discriminator) {
|
|
845
|
+
const { discriminator } = schema;
|
|
846
|
+
return (
|
|
847
|
+
<DiscriminatorNode
|
|
848
|
+
discriminator={discriminator}
|
|
849
|
+
schema={schema}
|
|
850
|
+
schemaType={schemaType}
|
|
851
|
+
/>
|
|
852
|
+
);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
// Handle allOf, oneOf, anyOf without discriminators
|
|
741
856
|
if (schema.allOf) {
|
|
742
857
|
const mergedSchemas = mergeAllOf(schema) as SchemaObject;
|
|
743
858
|
|
|
@@ -766,6 +881,10 @@ const SchemaNode: React.FC<SchemaProps> = ({ schema, schemaType }) => {
|
|
|
766
881
|
);
|
|
767
882
|
}
|
|
768
883
|
|
|
884
|
+
if (schema.oneOf || schema.anyOf) {
|
|
885
|
+
return <AnyOneOf schema={schema} schemaType={schemaType} />;
|
|
886
|
+
}
|
|
887
|
+
|
|
769
888
|
// Handle primitives
|
|
770
889
|
if (
|
|
771
890
|
schema.type &&
|