We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b610909 commit ad9bd57Copy full SHA for ad9bd57
packages/language/src/index.ts
@@ -186,8 +186,12 @@ function linkContentToContainer(node: AstNode): void {
186
function validationAfterImportMerge(model: Model) {
187
const errors: string[] = [];
188
const dataSources = model.declarations.filter((d) => isDataSource(d));
189
- if (dataSources.length > 1) {
190
- errors.push('Validation error: Multiple datasource declarations are not allowed');
+ if (dataSources.length === 0) {
+ errors.push('Validation error: schema must have a datasource declaration');
191
+ } else {
192
+ if (dataSources.length > 1) {
193
+ errors.push('Validation error: multiple datasource declarations are not allowed');
194
+ }
195
}
196
197
// at most one `@@auth` model
0 commit comments