Implement validation service methods to make validation section functional in Publications tab #1161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR fixes the visibility and functionality of the DAK validation section in the Publications tab by implementing the previously stubbed validation service methods. The validation UI components were already integrated, but the underlying service layer was returning empty results, preventing users from seeing any validation output.
Problem
The validation framework components existed in
src/components/validation/and were properly imported into the Publications component, but clicking "Run Validation" produced no results. Investigation revealed that three critical service methods were stub implementations:This meant the validation section rendered but had no actual functionality - users couldn't validate their DAK artifacts against WHO SMART Guidelines standards.
Solution
1. ValidationContext Integration with GitHub Service
src/services/validation/ValidationContext.tsImplemented
getFileContent()to fetch actual file content from GitHub repositories:Implemented
listFiles()to recursively traverse repository structure:2. Complete Repository Validation Orchestration
src/services/validation/DAKArtifactValidationService.tsImplemented
validateRepository()to perform comprehensive DAK validation:3. Type System Updates
src/services/validation/types.tsAdded
isValidfield toDAKValidationReportinterface for clearer validation status:Component Type Detection
The implementation automatically determines DAK component types based on file paths:
input/vocabulary/or.fsh→ terminologyinput/profiles/→ fhir-profilesinput/extensions/→ fhir-extensionsbusiness-processes/or.bpmn→ business-processesdecision-logic/or.dmn→ decision-logicThis allows the validation system to apply the appropriate validation rules for each artifact type.
User Experience
After this PR, users can:
Files Modified
src/services/validation/ValidationContext.ts- Implemented file access methodssrc/services/validation/DAKArtifactValidationService.ts- Implemented validation orchestrationsrc/services/validation/types.ts- AddedisValidfield to report interfaceTesting
githubServiceRelated Issues
Fixes #1075 - "fix visibility of validation in PR #1075"
The validation section is now fully functional and ready for users to validate their WHO SMART Guidelines DAK artifacts.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.