Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,19 @@ public override async Task PopulateTriggerMetadataForTable(string entityName, st
if ("UPDATE".Equals(type_desc))
{
sourceDefinition.IsUpdateDMLTriggerEnabled = true;
_logger.LogInformation($"An update trigger is enabled for the entity: {entityName}");
if (!_isValidateOnly)
{
_logger.LogInformation($"An update trigger is enabled for the entity: {entityName}");
}
}

if ("INSERT".Equals(type_desc))
{
sourceDefinition.IsInsertDMLTriggerEnabled = true;
_logger.LogInformation($"An insert trigger is enabled for the entity: {entityName}");
if (!_isValidateOnly)
{
_logger.LogInformation($"An insert trigger is enabled for the entity: {entityName}");
}
}
}
}
Expand Down Expand Up @@ -362,13 +368,16 @@ protected override async Task GenerateAutoentitiesIntoEntities(IReadOnlyDictiona
subStatusCode: DataApiBuilderException.SubStatusCodes.ErrorInInitialization);
}

if (runtimeConfig.IsRestEnabled)
if (!_isValidateOnly)
{
_logger.LogInformation("[{entity}] REST path: {globalRestPath}/{entityRestPath}", entityName, runtimeConfig.RestPath, entityName);
}
else
{
_logger.LogInformation(message: "REST calls are disabled for the entity: {entity}", entityName);
if (runtimeConfig.IsRestEnabled)
{
_logger.LogInformation("[{entity}] REST path: {globalRestPath}/{entityRestPath}", entityName, runtimeConfig.RestPath, entityName);
}
else
{
_logger.LogInformation(message: "REST calls are disabled for the entity: {entity}", entityName);
}
}

addedEntities++;
Expand Down
19 changes: 11 additions & 8 deletions src/Core/Services/MetadataProviders/SqlMetadataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,19 @@ public SqlMetadataProvider(
_databaseType = runtimeConfig.GetDataSourceFromDataSourceName(dataSourceName).DatabaseType;
_logger = logger;
_isValidateOnly = isValidateOnly;
foreach ((string entityName, Entity entityMetatdata) in Entities)
if (!_isValidateOnly)
{
if (runtimeConfig.IsRestEnabled)
foreach ((string entityName, Entity entityMetatdata) in Entities)
{
string restPath = entityMetatdata.Rest?.Path ?? entityName;
_logger.LogInformation("[{entity}] REST path: {globalRestPath}/{entityRestPath}", entityName, runtimeConfig.RestPath, restPath);
}
else
{
_logger.LogInformation(message: "REST calls are disabled for the entity: {entity}", entityName);
if (runtimeConfig.IsRestEnabled)
{
string restPath = entityMetatdata.Rest?.Path ?? entityName;
_logger.LogInformation("[{entity}] REST path: {globalRestPath}/{entityRestPath}", entityName, runtimeConfig.RestPath, restPath);
}
else
{
_logger.LogInformation(message: "REST calls are disabled for the entity: {entity}", entityName);
}
}
}

Expand Down
Loading