mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
linter: Fix checking for inline refs.
The current linter disallowed the pattern where multiple refs were present without an additional parameter in allOf, which should be valid. Fixed the condition to allow the change.
This commit is contained in:
committed by
Tim Abbott
parent
31d85e2d3b
commit
fbf9de671a
@@ -13,7 +13,7 @@ function checkRefSiblings(file, path, data) {
|
||||
if (typeof data === "object" && data !== null) {
|
||||
if (
|
||||
"allOf" in data &&
|
||||
Object.values(data.allOf).filter((subschema) => !("$ref" in subschema)).length !== 1
|
||||
Object.values(data.allOf).filter((subschema) => !("$ref" in subschema)).length > 1
|
||||
) {
|
||||
console.error(
|
||||
`${file}: Too many inline allOf subschemas at ${JSON.stringify(
|
||||
|
||||
Reference in New Issue
Block a user