Skip to content

Commit 1972a8f

Browse files
Add check so that either entities or autoentities is required
1 parent 1e32f35 commit 1972a8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Config/ObjectModel/RuntimeConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public RuntimeConfig(
292292
};
293293

294294
_entityNameToDataSourceName = new Dictionary<string, string>();
295-
if (Entities is null && Autoentities is null)
295+
if ((Entities is null || Entities.Entities.Count == 0) && Autoentities is null)
296296
{
297297
throw new DataApiBuilderException(
298298
message: "Configuration file should contain either at least the Entities or Autoentities property",

0 commit comments

Comments
 (0)