Closed tomasgvivo closed 5 years ago
Given schema1
schema1
{ type: 'object', properties: { properties: { foo: { type: "string" } }, }, required: ["foo"] }
And given schema2
schema2
{ $merge: { source: schema1, with: { type: 'object', properties: { bar: { type: "string" } }, required: ["baz"] } } }
I expect foo and bar to be required in schema2. Instead, only bar is required.
foo
bar
Is this a bug or a feature?
$merge does merging as defined in the related RFC (see the docs) - array values are supposed to be overwritten. $patch allows adding to arrays but with more complex syntax.
Given
schema1
And given
schema2
I expect
foo
andbar
to be required inschema2
. Instead, onlybar
is required.Is this a bug or a feature?