Skip to content

Commit aa3eb86

Browse files
committed
Use anyOf for required fields
1 parent d704bd4 commit aa3eb86

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/sync-rules/src/SqlDataQuery.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,12 @@ export class SqlDataQuery extends BaseSqlDataQuery {
186186
}
187187

188188
evaluateRow(table: SourceTableInterface, row: SqliteRow): EvaluationResult[] {
189-
const query = this;
190-
191189
return this.evaluateRowWithOptions({
192190
table,
193191
row,
194-
bucketIds(tables) {
195-
const bucketParameters = query.filter.filterRow(tables);
196-
return bucketParameters.map((params) => getBucketId(query.descriptorName, query.bucketParameters, params));
192+
bucketIds: (tables) => {
193+
const bucketParameters = this.filter.filterRow(tables);
194+
return bucketParameters.map((params) => getBucketId(this.descriptorName, this.bucketParameters, params));
197195
}
198196
});
199197
}

packages/sync-rules/src/json_schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const syncRulesSchema: ajvModule.Schema = {
109109
}
110110
}
111111
},
112-
required: [],
112+
anyOf: [{ required: ['bucket_definitions'] }, { required: ['streams'] }],
113113
additionalProperties: false
114114
} as const;
115115

0 commit comments

Comments
 (0)