Skip to content

Commit

Permalink
Merge pull request #212 from FirelyTeam/feature/VONK-5687-Implement
Browse files Browse the repository at this point in the history
VONK-5687: Move enterprise validation to separate repo
  • Loading branch information
ewoutkramer authored Dec 11, 2023
2 parents 9b90369 + b9cd664 commit 3b6b5ce
Show file tree
Hide file tree
Showing 35 changed files with 188 additions and 553 deletions.
11 changes: 11 additions & 0 deletions Firely.Validator.API.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
firely-validator-api-tests.props = firely-validator-api-tests.props
firely-validator-api.props = firely-validator-api.props
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{7D9F5C18-2827-4975-8FBF-DD45758075AE}"
Expand Down Expand Up @@ -45,6 +46,8 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Firely.Fhir.Validation.Shar
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Firely.Fhir.Validation.STU3", "src\Firely.Fhir.Validation.STU3\Firely.Fhir.Validation.STU3.csproj", "{4C9C5275-0C05-4CDE-A74C-1B43245252FB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Firely.Fhir.Validation.R5", "src\Firely.Fhir.Validation.R5\Firely.Fhir.Validation.R5.csproj", "{50A76DB5-171D-42BB-AEA7-E144E9589417}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -112,6 +115,12 @@ Global
{4C9C5275-0C05-4CDE-A74C-1B43245252FB}.FullDebug|Any CPU.Build.0 = Debug|Any CPU
{4C9C5275-0C05-4CDE-A74C-1B43245252FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C9C5275-0C05-4CDE-A74C-1B43245252FB}.Release|Any CPU.Build.0 = Release|Any CPU
{50A76DB5-171D-42BB-AEA7-E144E9589417}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50A76DB5-171D-42BB-AEA7-E144E9589417}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50A76DB5-171D-42BB-AEA7-E144E9589417}.FullDebug|Any CPU.ActiveCfg = Debug|Any CPU
{50A76DB5-171D-42BB-AEA7-E144E9589417}.FullDebug|Any CPU.Build.0 = Debug|Any CPU
{50A76DB5-171D-42BB-AEA7-E144E9589417}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50A76DB5-171D-42BB-AEA7-E144E9589417}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -129,8 +138,10 @@ Global
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Firely.Fhir.Validation.Compilation.Shared\Firely.Fhir.Validation.Compilation.Shared.projitems*{052b9175-3a5b-46ca-b677-8d082c9a6063}*SharedItemsImports = 5
src\Firely.Fhir.Validation.Shared\Firely.Fhir.Validation.Shared.projitems*{21bf806c-bbe6-4a33-91f9-bf3ab5f1e70b}*SharedItemsImports = 13
src\Firely.Fhir.Validation.Shared\Firely.Fhir.Validation.Shared.projitems*{22520a59-7ebf-4740-a66c-3651742fac0b}*SharedItemsImports = 5
src\Firely.Fhir.Validation.Shared\Firely.Fhir.Validation.Shared.projitems*{4c9c5275-0c05-4cde-a74c-1b43245252fb}*SharedItemsImports = 5
src\Firely.Fhir.Validation.Shared\Firely.Fhir.Validation.Shared.projitems*{50a76db5-171d-42bb-aea7-e144e9589417}*SharedItemsImports = 5
src\Firely.Fhir.Validation.Compilation.Shared\Firely.Fhir.Validation.Compilation.Shared.projitems*{7391862b-ac99-40c5-a616-dc83edd83a88}*SharedItemsImports = 5
src\Firely.Fhir.Validation.Compilation.Shared\Firely.Fhir.Validation.Compilation.Shared.projitems*{7794c7d2-ea50-405d-a61a-23f8ecf4228b}*SharedItemsImports = 13
test\Firely.Fhir.Validation.Compilation.Tests.Shared\Firely.Fhir.Validation.Compilation.Tests.Shared.projitems*{994a42c0-396b-48b6-81a0-4e622460ecab}*SharedItemsImports = 5
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# firely-serverless-validator
# firely-validator-api
Validation tool for use in serverless functions like Lambda or Azure Functions
2 changes: 1 addition & 1 deletion build/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Repo: FirelyTeam/firely-serverless-validator
# Repo: FirelyTeam/firely-validator-api
# File: build/azure-pipelines.yml

trigger:
Expand Down
44 changes: 32 additions & 12 deletions build/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,43 @@

parameters:
# Default values
dotNetCoreVersion: '3.1.102' # can also be use with wildcards: latest minor version of 3. , use '3.x'
useVersionSuffix: true
restoreDependencies: false
nuGetServiceConnections: #required when restoreDependies = true
nuGetSources: #required when restoreDependies = true
packageArtifacts: false
publishArtifacts: false
publishWebProjects: false
zipAfterPublish: false
checkoutSubmodules: false
pool: {}
- name: dotNetCoreVersion
type: string
default: '3.1.102' # can also be use with wildcards: latest minor version of 3. , use '3.x'
- name: useVersionSuffix
type: boolean
default: true
- name: restoreDependencies
type: boolean
default: false
- name: nuGetServiceConnections #required when restoreDependies = true
type: string
- name: nuGetSources #required when restoreDependies = true
type: string
- name: packageArtifacts
type: boolean
default: false
- name: publishArtifacts
type: boolean
default: false
- name: publishWebProjects
type: boolean
default: false
- name: zipAfterPublish
type: boolean
default: false
- name: checkoutSubmodules
type: boolean
default: false
- name: pool
type: object
default: {}

jobs:
- job: Build
pool: ${{ parameters.pool }}
steps:
- task: DotNetCoreInstaller@2
- task: UseDotNet@2
inputs:
version: ${{ parameters.dotNetCoreVersion }}

Expand Down
6 changes: 4 additions & 2 deletions build/templates/sign-dlls-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ steps:
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR
- powershell: |
[System.IO.FileSystemInfo[]]$files = Get-ChildItem -Path $(Build.SourcesDirectory)\src\Firely.Fhir.Validation\bin\*\*\Firely.Fhir.Validation.dll
[System.IO.FileSystemInfo[]]$files += Get-ChildItem -Path $(Build.SourcesDirectory)\src\Firely.Fhir.Validation.Compilation\bin\*\*\Firely.Fhir.Validation.Compilation.**\*\Firely.Fhir.Validation.Compilation.*.dll
[System.IO.FileSystemInfo[]]$files += Get-ChildItem -Path $(Build.SourcesDirectory)\src\Firely.Fhir.Validation.Compilation\bin\*\*\Firely.Fhir.Validation.Compilation.dll
[System.IO.FileSystemInfo[]]$files += Get-ChildItem -Path $(Build.SourcesDirectory)\src\Firely.Fhir.Validation.Compilation.STU3\bin\*\*\Firely.Fhir.Validation.Compilation.STU3.dll
Write-Verbose "Last exitcode before signing: $lastexitcode"
foreach ($file in $files)
{
Write-Verbose "Signing file: $file"
Write-Host "Signing file: $file"
& '$(Build.SourcesDirectory)\build\tools\sn.exe' -R $file $(Build.SourcesDirectory)\FirelyValidator.snk
Write-Verbose "Last exitcode after signing file: $lastexitcode"
Expand Down
4 changes: 2 additions & 2 deletions firely-validator-api.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Solution-wide properties for NuGet packaging -->
<PropertyGroup>
<VersionPrefix>1.2.0-alpha5</VersionPrefix>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>Firely</Authors>
<Company>Firely (https://fire.ly)</Company>
<Copyright>Copyright 2015-2022 Firely</Copyright>
Expand All @@ -12,7 +12,7 @@

<!-- Compiler settings -->
<PropertyGroup>
<LangVersion>9.0</LangVersion>
<LangVersion>12.0</LangVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@

<ItemGroup>
<ProjectReference Include="..\Firely.Fhir.Validation\Firely.Fhir.Validation.csproj" />
<InternalsVisibleTo Include="Firely.Fhir.Validation.STU3" Key="$(LibraryPKHash)" />
<InternalsVisibleTo Include="Firely.Fhir.Validation.Compilation.STU3.Tests" Key="$(LibraryPKHash)" />
</ItemGroup>
</Project>

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)ElementConversionMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)EnterpriseSchemaBuilders\ElementDefinitionBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)EnterpriseSchemaBuilders\StructureDefinitionBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Properties\AssemblyInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SchemaBuilderExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SchemaBuilders\BaseSchemaBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SchemaBuilders\CardinalityBuilder.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (C) 2023, Firely (info@fire.ly) - All Rights Reserved
* Proprietary and confidential. Unauthorized copying of this file,
* via any medium is strictly prohibited.
*/

using System;
using System.Runtime.CompilerServices;

[assembly: CLSCompliant(true)]

#if DEBUG
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.STU3")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.R4")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.R5")]

[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Tests")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.STU3.Tests")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.R4.Tests")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.R5.Tests")]

[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.STU3")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Enterprise.Tests")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.STU3.Tests")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.R4.Tests")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.R5.Tests")]
#endif

#if RELEASE
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.STU3, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.R4, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.R5, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.STU3.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.R4.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.R5.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.STU3, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Enterprise.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.STU3.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.R4.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]
[assembly: InternalsVisibleTo("Firely.Fhir.Validation.Compilation.Enterprise.R5.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1")]

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ public StandardBuilders(IAsyncResourceResolver source)
new RegexBuilder(),
new ContentReferenceBuilder(),
new TypeReferenceBuilder(source),
new CanonicalBuilder(),
new ElementDefinitionBuilder(),
new StructureDefinitionBuilder()
new CanonicalBuilder()
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,32 @@ internal class StructureDefinitionToElementSchemaResolver : IElementSchemaResolv
/// Creates an <see cref="IElementSchemaResolver" /> that includes for resolving types from
/// the System/CQL namespace and that uses caching to optimize performance.
/// </summary>
public static IElementSchemaResolver CreatedCached(IAsyncResourceResolver source) =>
new CachedElementSchemaResolver(Create(source));
public static IElementSchemaResolver CreatedCached(IAsyncResourceResolver source, IEnumerable<ISchemaBuilder>? extraSchemaBuilders = null) =>
new CachedElementSchemaResolver(Create(source, extraSchemaBuilders));

/// <inheritdoc cref="CreatedCached(IAsyncResourceResolver)"/>
/// <inheritdoc cref="CreatedCached(IAsyncResourceResolver, IEnumerable{ISchemaBuilder}?)"/>"
public static IElementSchemaResolver CreatedCached(IAsyncResourceResolver source, ConcurrentDictionary<Canonical, ElementSchema?> cache) =>
new CachedElementSchemaResolver(Create(source), cache);

/// <summary>
/// Creates an <see cref="IElementSchemaResolver"/> that includes support for resolving types from
/// the System/CQL namespace.
/// </summary>
public static IElementSchemaResolver Create(IAsyncResourceResolver source) =>
new MultiElementSchemaResolver(
public static IElementSchemaResolver Create(IAsyncResourceResolver source, IEnumerable<ISchemaBuilder>? extraSchemaBuilders = null)
{
var builders = new List<ISchemaBuilder>();

// is StandardBuilder not included in extraSchemaBuilders?
if (extraSchemaBuilders?.FirstOrDefault(b => b is StandardBuilders) is null)
builders.Add(new StandardBuilders(source));

builders.AddRange(extraSchemaBuilders ?? Enumerable.Empty<ISchemaBuilder>());

return new MultiElementSchemaResolver(
new StructureDefinitionToElementSchemaResolver(
new StructureDefinitionCorrectionsResolver(source),
new[] { new StandardBuilders(source) }),
new StructureDefinitionCorrectionsResolver(source), builders),
new SystemNamespaceElementSchemaResolver());
}

/// <summary>
/// The <see cref="IAsyncResourceResolver"/> used as the source for resolving StructureDefinitions,
Expand Down
Loading

0 comments on commit 3b6b5ce

Please sign in to comment.