-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: create json schema for user-input recipe #222
Merged
nullPointer373
merged 2 commits into
Yifan-recipe-validation
from
Yifan-recipe-validation-add-schema
Aug 8, 2023
Merged
feat: create json schema for user-input recipe #222
nullPointer373
merged 2 commits into
Yifan-recipe-validation
from
Yifan-recipe-validation-add-schema
Aug 8, 2023
Conversation
This file contains 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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## Yifan-recipe-validation #222 +/- ##
==========================================================
Coverage ? 97.55%
==========================================================
Files ? 42
Lines ? 1516
Branches ? 0
==========================================================
Hits ? 1479
Misses ? 37
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
saranyailla
reviewed
Aug 7, 2023
saranyailla
reviewed
Aug 7, 2023
saranyailla
reviewed
Aug 7, 2023
saranyailla
previously approved these changes
Aug 8, 2023
nullPointer373
force-pushed
the
Yifan-recipe-validation-add-schema
branch
from
August 8, 2023 18:29
c7c658d
to
58d2aa7
Compare
saranyailla
approved these changes
Aug 8, 2023
urvashijain18
approved these changes
Aug 8, 2023
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.
Issue #, if available:
Description of changes:
I have added a JSON schema file that defines the user-input recipe format and structure. The schema is based on the existing recipe definition in its Java package and its documentation, which allows for further semantic validation.
Why is this change necessary:
The JSON schema is essential for validating user-input recipes and ensuring they conform to the expected format. By using the schema, we can enforce constraints on the recipe properties and catch any potential errors or invalid input early in the process.
How was this change tested:
I have tested the JSON schema by validating it against various recipes manually. And all unit tests (including newly added tests) and integration tests passed successfully.
Any additional information or context required to review the change:
One important aspect to consider is the naming convention for recipe properties. While the recipe follows the CamelCase naming convention for properties in its documentation, hands-on experimentation has revealed that the recipe properties can be case-insensitive when specified. To accommodate this behavior, I have deliberately made all property names in the JSON schema lowercase. During the validation process, the property names will be converted to lowercase in the data object before applying the schema. This approach ensures that the validation process is case-insensitive and can handle variations in property casing.
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.