Skip to content

Conversation

gfs
Copy link
Contributor

@gfs gfs commented Oct 16, 2025

This pull request introduces enhancements to the RuleSchemaProvider class, allowing schema providers to be created directly from JSON schema content strings, and adds unit tests to verify this new functionality and its error handling. These changes improve the flexibility and testability of the schema validation logic. To allow for extensibility by devSkim which will have its own schema loaded as an embedded resource - not a file on disk.

@gfs gfs requested a review from Copilot October 16, 2025 21:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a factory method to build RuleSchemaProvider instances directly from a JSON schema string and introduces tests for this new initialization path and rule validation.

  • Adds FromSchemaContent factory plus supporting private constructor and refactors existing loaders to use a shared LoadSchemaFromContent helper.
  • Introduces tests for successful load, null/empty argument handling, and validation against a minimal custom schema.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
AppInspector.RulesEngine/Schema/RuleSchemaProvider.cs Adds string-based factory method, private constructor, and shared schema content loader.
AppInspector.Tests/RuleProcessor/SchemaValidationTests.cs Adds unit tests for new factory method and rule validation with a minimal schema.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gfs gfs requested a review from Copilot October 16, 2025 23:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants