diff --git a/src/Microsoft.Health.Fhir.Core/Features/Conformance/SystemConformanceProvider.cs b/src/Microsoft.Health.Fhir.Core/Features/Conformance/SystemConformanceProvider.cs index a2fef4a867..4e10d6ef64 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Conformance/SystemConformanceProvider.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Conformance/SystemConformanceProvider.cs @@ -87,6 +87,16 @@ public SystemConformanceProvider( _urlResolver = urlResolver; _contextAccessor = contextAccessor; _searchParameterStatusManager = searchParameterStatusManager; + + if (!string.IsNullOrEmpty(_configuration.Value.Versioning.Default)) + { + _logger.LogInformation("Default version is:{VersioningDefault}.", _configuration.Value.Versioning.Default); + + foreach (var resourcetype in _configuration.Value.Versioning.ResourceTypeOverrides) + { + _logger.LogInformation("{ResourceTypeKey} version overridden to:{ResourceTypeVersioningOverride}.", resourcetype.Key, resourcetype.Value); + } + } } public override async Task GetCapabilityStatementOnStartup(CancellationToken cancellationToken = default(CancellationToken)) diff --git a/src/Microsoft.Health.Fhir.Shared.Api/Modules/FhirModule.cs b/src/Microsoft.Health.Fhir.Shared.Api/Modules/FhirModule.cs index 10afa1cb66..03f6bb1f77 100644 --- a/src/Microsoft.Health.Fhir.Shared.Api/Modules/FhirModule.cs +++ b/src/Microsoft.Health.Fhir.Shared.Api/Modules/FhirModule.cs @@ -10,6 +10,7 @@ using Hl7.Fhir.Model; using Hl7.Fhir.Serialization; using Hl7.FhirPath; +using MediatR; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.Extensions.DependencyInjection; @@ -27,6 +28,7 @@ using Microsoft.Health.Fhir.Core.Features.Context; using Microsoft.Health.Fhir.Core.Features.Persistence; using Microsoft.Health.Fhir.Core.Features.Security; +using Microsoft.Health.Fhir.Core.Messages.CapabilityStatement; using Microsoft.Health.Fhir.Core.Models; namespace Microsoft.Health.Fhir.Api.Modules @@ -128,7 +130,8 @@ ResourceElement SetMetadata(Resource resource, string versionId, DateTimeOffset services.AddSingleton(_ => () => Guid.NewGuid().ToString()); // Add conformance provider for implementation metadata. - services.Add() + services.RemoveServiceTypeExact>() + .Add() .Singleton() .AsSelf() .AsImplementedInterfaces();