Open EniacMlezi opened 2 months ago
Looks like this could be a possible fix: https://github.com/FirelyTeam/firely-net-sdk/issues/1786
Just tested it out, seems to be working with this patch:
diff --git a/src/Microsoft.Health.Fhir.Shared.Core/Features/Validation/ProfileValidator.cs b/src/Microsoft.Health.Fhir.Shared.Core/Features/Validation/ProfileValidator.cs
index 9ed39c7be..ccf7e573b 100644
--- a/src/Microsoft.Health.Fhir.Shared.Core/Features/Validation/ProfileValidator.cs
+++ b/src/Microsoft.Health.Fhir.Shared.Core/Features/Validation/ProfileValidator.cs
@@ -27,7 +27,7 @@ namespace Microsoft.Health.Fhir.Core.Features.Validation
try
{
- _resolver = new MultiResolver(new CachedResolver(ZipSource.CreateValidationSource(), options.Value.CacheDurationInSeconds), profilesResolver);
+ _resolver = new SnapshotSource(new MultiResolver(new CachedResolver(ZipSource.CreateValidationSource(), options.Value.CacheDurationInSeconds), profilesResolver));
}
catch (Exception)
{
@@ -41,7 +41,7 @@ namespace Microsoft.Health.Fhir.Core.Features.Validation
var ctx = new ValidationSettings()
{
ResourceResolver = _resolver,
- GenerateSnapshot = true,
+ GenerateSnapshot = false,
Trace = false,
ResolveExternalReferences = false,
};
Thanks for suggesting the change, we will review the PR and revert back #AB125854
Describe the bug During validation of a Resource on Create (ProfileValidationOnCreate = true), I get the following error:
Internal logic failure: StructureDefinition 'http://nictiz.nl/fhir/StructureDefinition/ext-SOAPReport.SOAPLineCode' has no snapshot component. (Parameter 'sd')
Which is true, but shouldn't profile snapshots be generated?
These are the profiles I'm trying to use: SoapLine:
ZIB SoapLine:
SoapLineCode Extension:
FHIR Version? R4
Data provider? SQL Server
To Reproduce Steps to reproduce the behavior:
Expected behavior 201 Created result.
Actual behavior 400 Bad Request: