Merged
Conversation
• Adds -validate flag to validate JSON requests against the notecard schema • Implements schema validation using github.com/santhosh-tekuri/jsonschema/v5 • Validates requests before sending them to the notecard Co-Authored-By: zfields@blues.com <zfields@blues.com>
Contributor
Author
|
Original prompt from zfields@blues.com: |
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: zfields@blues.com <zfields@blues.com>
• Remove unused imports • Fix invalid break statement Co-Authored-By: zfields@blues.com <zfields@blues.com>
• Remove success message on validation • Abort request on validation failure Co-Authored-By: zfields@blues.com <zfields@blues.com>
• Replace invalid break with goto statement • Add done label for error handling • Ensure validation errors are properly logged Co-Authored-By: zfields@blues.com <zfields@blues.com>
• Change flag from -validate to -force • Validate JSON requests by default • Only bypass validation when -force flag is provided Co-Authored-By: zfields@blues.com <zfields@blues.com>
• Add information about -force flag to all validation error messages • Inform users they can bypass validation with -force flag Co-Authored-By: zfields@blues.com <zfields@blues.com>
rayozzie
approved these changes
Apr 30, 2025
Contributor
|
u break it u own it |
Simplify and improve retrieval of external schemas
e29ab31 to
feabff8
Compare
feabff8 to
cd4a3fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add -validate flag to notecard CLI
This PR adds a
-validateflag to thenotecardCLI that validates JSON requests against the notecard JSON schema when used in conjunction with the-reqparameter.Changes
-validateflag that works with-reqparameterTesting
The changes were tested manually with valid and invalid JSON requests.
Link to Devin run: https://app.devin.ai/sessions/854ad94e860047dc97be3958dfb9073b
Requested by: zfields@blues.com