-
Notifications
You must be signed in to change notification settings - Fork 70
[schemas] Remove errant defaults from [capability.json] #380
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
base: master
Are you sure you want to change the base?
[schemas] Remove errant defaults from [capability.json] #380
Conversation
- Remove invalid default array at schema root level - Fix JSON Schema design issue in capability.json - Defaults are properly handled in component.json schema - Resolves invalid schema structure that contained hardcoded capability objects Fixes meshery#341 Signed-off-by: Saksham Singh Rathore <[email protected]>
Yay, your first pull request! 👍 A contributor will be by to give feedback soon. In the meantime, you can find updates in the #github-notifications channel in the community Slack. |
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.
Summary of Changes
Hello @saksham-1304, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
I've made a crucial correction to the capability.json
schema by removing an incorrectly placed default
array. This array contained hardcoded capability objects that were not meant to reside at the schema's root. The intent is to ensure that default values for capabilities are properly managed within the component.json
schema, thereby fixing a design issue and improving the overall validity and structure of our JSON schemas.
Highlights
- Schema Correction: I've removed an invalid
default
array from the root level ofcapability.json
. - Design Fix: I've addressed a JSON Schema design issue where
capability.json
contained hardcoded capability objects. - Schema Structure: This change resolves an invalid schema structure, ensuring defaults are handled correctly in
component.json
as intended.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
This pull request correctly removes an invalid default
property from the capability.json
schema, which is a good fix. However, there is a critical issue: the generated TypeScript schema file, typescript/constructs/v1alpha1/capability/CapabilitySchema.ts
, has not been updated to reflect this change and still contains the removed default
property. This makes the generated file out of sync with its source and will lead to incorrect behavior for consumers of this schema. Please ensure all generated files are updated and committed before this PR is merged. Additionally, a minor comment about file formatting is also included.
- Remove invalid default array at schema root level - Fix JSON Schema design issue in capability.json - Defaults are properly handled in component.json schema - Resolves invalid schema structure that contained hardcoded capability objects Fixes meshery#341 Signed-off-by: Saksham Singh Rathore <[email protected]>
/gemini review |
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.
Code Review
This pull request correctly removes an invalid default
array from the capability.json
schema and its corresponding TypeScript files. This resolves an issue with hardcoded capability objects in the schema definition. The changes also involve inlining several definitions from core.json
into capability.json
. My review focuses on ensuring the correctness of these inlined definitions. I've identified a couple of issues with regular expression patterns and descriptions that were propagated during this process and have provided suggestions for fixes.
- Remove invalid default array at schema root level - Fix JSON Schema design issue in capability.json - Defaults are properly handled in component.json schema - Resolves invalid schema structure that contained hardcoded capability objects Fixes meshery#341 Signed-off-by: Saksham Singh Rathore <[email protected]>
@aabidsofi19 |
Thank you for your contribution!! |
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.
These properties are not errant, but intentional and should remain in the specification.
Notes for Reviewers
This PR fixes #341
Changes Made
capability.json
component.json
schema where they belongTesting
Signed commits