EOS project: json mandatory, optional schame difference
{
type: "object",
properties: {
name: { type: "string" },
age: { type: "integer", minimum: 0 },
email: { type: "string", format: "email" },
address: {
type: "object",
properties: {
street: { type: "string" },
city: { type: "string" },
postalCode: { type: "string" }
},
required: ["street", "city", "postalCode"]
}
},
required: ["name", "age", "email"]
}
-------------------------------------------------------------------------
{
type: "object",
properties: {
name: { type: "string" },
age: { type: "integer", minimum: 0 },
email: { type: "string", format: "email" },
address: {
type: "object",
properties: {
street: { type: "string" },
city: { type: "string" },
postalCode: { type: "string" }
}
// Removed the required array from address
}
}
// Removed the required array from the main schema
}