spec: schema docs for new ACP dashboard subpage routes

This commit is contained in:
Julian Lam
2021-02-24 12:28:08 -05:00
parent 2f89b0d791
commit 0804d54759
12 changed files with 235 additions and 38 deletions

View File

@@ -486,7 +486,11 @@ describe('API', async () => {
if (obj.allOf) {
obj = { properties: flattenAllOf(obj.allOf) };
} else {
required = required.concat(obj.required ? obj.required : Object.keys(obj.properties));
try {
required = required.concat(obj.required ? obj.required : Object.keys(obj.properties));
} catch (e) {
assert.fail(`Syntax error re: allOf, perhaps you allOf'd an array? (path: ${method} ${path}, context: ${context})`);
}
}
return { ...memo, ...obj.properties };