Open
Description
In cases of interface inheritance, the generated json schema joins the two definitions with allOf
.
However, when the definitions have "additionalProperties": false
the generated schema is incorrect.
A possible workaround, is having "additionalProperties": true
for both the extended and the extending interface (but this would allow also for other properties).
Test case:
interface Example extends BaseExample {
exampleProperty: string;
}
interface BaseExample {
baseExampleProperty: number;
}
Error:
Property baseExampleProperty is not allowed.
Property exampleProperty is not allowed.
More about the issue:
json-schema-org/json-schema-spec#348
https://spacetelescope.github.io/understanding-json-schema/reference/combining.html