Files
react-jsonschema-form/packages/core/playground/samples/anyOf.js
Jason Ritchie ef8b7fce19 Monorepo with Lerna (#1501)
Use Lerna to maintain core and themes as a monorepo. This should streamline creation of new themes and maintenance of existing theme(s).
2019-11-10 08:26:01 -08:00

60 lines
1.1 KiB
JavaScript

module.exports = {
schema: {
type: "object",
properties: {
age: {
type: "integer",
title: "Age",
},
items: {
type: "array",
items: {
type: "object",
anyOf: [
{
properties: {
foo: {
type: "string",
},
},
},
{
properties: {
bar: {
type: "string",
},
},
},
],
},
},
},
anyOf: [
{
title: "First method of identification",
properties: {
firstName: {
type: "string",
title: "First name",
default: "Chuck",
},
lastName: {
type: "string",
title: "Last name",
},
},
},
{
title: "Second method of identification",
properties: {
idCode: {
type: "string",
title: "ID code",
},
},
},
],
},
formData: {},
};