-
Notifications
You must be signed in to change notification settings - Fork 2
Upgrade SDK version to alpha2 #509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade SDK version to alpha2 #509
Conversation
…e validator essentially works against SDK-6
…feature/upgrade-sdk-to-6.0.0-alpha2 # Conflicts: # firely-validator-api.props # src/Firely.Fhir.Validation/Firely.Fhir.Validation.csproj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the SDK version to alpha2 by updating the validation API to use ITypedElement instead of IScopedNode and aligning resource conversion calls accordingly.
- Updated method signatures and XML documentation to use ITypedElement.
- Modified resource resolution methods to use TryResolve…Async and updated schema builder using directives.
Reviewed Changes
Copilot reviewed 88 out of 91 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Firely.Fhir.Validation/Impl/ElementSchema.cs | Updated validation signatures and using directives to use ITypedElement. |
| src/Firely.Fhir.Validation/Impl/DatatypeSchema.cs | Replaced IScopedNode with ITypedElement in method parameters and error messages. |
| src/Firely.Fhir.Validation/Impl/ChildrenValidator.cs | Converted children matching and validation logic to ITypedElement. |
| src/Firely.Fhir.Validation/Impl/CardinalityValidator.cs | Updated interface implementations to reflect new element type. |
| src/Firely.Fhir.Validation/Impl/CanonicalValidator.cs | Updated method signature to use ITypedElement. |
| src/Firely.Fhir.Validation/Impl/BindingValidator.cs | Switched validation method parameter types to ITypedElement. |
| src/Firely.Fhir.Validation/Impl/BasicValidator.cs | Changed abstract validation method parameter types to ITypedElement. |
| src/Firely.Fhir.Validation/Impl/AnyValidator.cs | Adjusted validation group routines to use ITypedElement. |
| src/Firely.Fhir.Validation/Impl/AllValidator.cs | Updated IValidatable and IGroupValidatable implementations for ITypedElement. |
| src/Firely.Fhir.Validation.Shared/Validator.cs | Converted resource conversion calls to ITypedElement using ToPocoNode. |
| src/Firely.Fhir.Validation.Compilation.Shared/StructureDefinitionToElementSchemaResolver.cs | Updated pattern matching for StructureDefinition resolution. |
| src/Firely.Fhir.Validation.Compilation.Shared/StructureDefinitionCorrectionsResolver.cs | Replaced ResolveBy* calls with TryResolveBy* and adjusted schema corrections. |
| SchemaBuilders files (*.cs) | Added missing using directives for Hl7.Fhir.Model. |
Files not reviewed (3)
- .idea/.idea.Firely.Validator.API/.idea/projectSettingsUpdater.xml: Language not supported
- firely-validator-api-tests.props: Language not supported
- firely-validator-api.props: Language not supported
src/Firely.Fhir.Validation.Compilation.Shared/StructureDefinitionCorrectionsResolver.cs
Outdated
Show resolved
Hide resolved
src/Firely.Fhir.Validation.Compilation.Shared/StructureDefinitionCorrectionsResolver.cs
Outdated
Show resolved
Hide resolved
…k-to-6.0.0-alpha2
test/Firely.Fhir.Validation.Compilation.Tests.R5/SchemaSnaps/Bundle.json
Outdated
Show resolved
Hide resolved
test/Firely.Fhir.Validation.Compilation.Tests.Shared/CommonTypeRefComponentTests.cs
Outdated
Show resolved
Hide resolved
test/Firely.Fhir.Validation.Compilation.Tests.Shared/ExtensionContextComponentTests.cs
Show resolved
Hide resolved
test/Firely.Fhir.Validation.Compilation.Tests.Shared/SlicingSchemaConverterTests.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # test/Firely.Fhir.Validation.Compilation.Tests.R4/TestData/issue-165/fhirpkg.lock.json # test/Firely.Fhir.Validation.Compilation.Tests.Shared/ExtensionContextComponentTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| Consider applying the 'await' operator to the result of the call. --> | ||
| <WarningsAsErrors>CS4014</WarningsAsErrors> | ||
| <WarningsNotAsErrors>NU5104</WarningsNotAsErrors> | ||
| <WarningsNotAsErrors>NU5104, CS8602, CS8604, CS8619, CS8620, CS8603</WarningsNotAsErrors> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From #513, we should not disable those warnings once PR is ready :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will require a TON of effort right now!!! I have well over 1000 of these errors because our model is now nullable! We should make a separate issue for this once the dust settles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Can you create a PR for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(aaah.....we don't have the preview of this new copilot stuff :-()
# Conflicts: # firely-validator-api-tests.props # firely-validator-api.props # src/Firely.Fhir.Validation/Impl/CardinalityValidator.cs # src/Firely.Fhir.Validation/Impl/FixedValidator.cs # src/Firely.Fhir.Validation/Impl/IssueAssertion.cs # src/Firely.Fhir.Validation/Impl/PatternValidator.cs # src/Firely.Fhir.Validation/Schema/ValueElementNode.cs # src/Firely.Fhir.Validation/Support/IScopedNodeExtensions.cs
…ha2' into feature/upgrade-sdk-to-6.0.0-alpha2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the SDK to v6 alpha2, refactoring the validation logic to use ITypedElement instead of IScopedNode and updating related error messages and dependency versions.
- Refactored validation method signatures and error messages across multiple validators
- Updated project properties, including version bumps and warning suppressions
- Adjusted namespace declarations and minor code clean-ups in the compilation shared files
Reviewed Changes
Copilot reviewed 88 out of 89 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Firely.Fhir.Validation/Impl/DatatypeSchema.cs | Updated validation method signatures and error messages to use ITypedElement |
| src/Firely.Fhir.Validation/Impl/ChildrenValidator.cs | Changed parameter types and related record definitions to ITypedElement |
| src/Firely.Fhir.Validation/Impl/CardinalityValidator.cs | Adjusted input parameter types and method implementations accordingly |
| src/Firely.Fhir.Validation/Impl/CanonicalValidator.cs | Updated method signature to use ITypedElement |
| src/Firely.Fhir.Validation/Impl/BindingValidator.cs | Updated signature and enhanced null handling in code representation |
| src/Firely.Fhir.Validation/Impl/BasicValidator.cs | Changed abstract methods and validation implementations to ITypedElement |
| src/Firely.Fhir.Validation/Impl/BaseTypeInvariantConstraintsValidator.cs | Updated method signature and error message for ITypedElement |
| src/Firely.Fhir.Validation/Impl/AnyValidator.cs | Refactored validation interfaces to use ITypedElement across the file |
| src/Firely.Fhir.Validation/Impl/AllValidator.cs | Updated validation implementations from IScopedNode to ITypedElement |
| src/Firely.Fhir.Validation.Shared/Validator.cs | Adjusted public API overloads and internal validation implementations to use ITypedElement with new conversion methods |
| src/Firely.Fhir.Validation.Compilation.Shared/StructureDefinitionToElementSchemaResolver.cs | Utilized modern pattern matching for schema retrieval |
| src/Firely.Fhir.Validation.Compilation.Shared/StructureDefinitionCorrectionsResolver.cs | Updated namespace declaration and resource resolution methods |
| src/Firely.Fhir.Validation.Compilation.Shared/SchemaBuilders/* | Added missing using of Hl7.Fhir.Model where necessary |
| firely-validator-api.props | Bumped version, added VersionSuffix, and updated warning configurations |
| firely-validator-api-tests.props | Updated SDK version and warning configurations |
Files not reviewed (1)
- .idea/.idea.Firely.Validator.API/.idea/projectSettingsUpdater.xml: Language not supported
|
Approved, but note that I had some questions about changes in the manifest tests. |
…peline until that PR is pulled
Description
Applied changes to make the validator run against SDK v6
Related issues
Closes FirelyTeam/firely-net-sdk#3032
Also review FirelyTeam/fhir-test-cases#61