Skip to content

Conversation

saksham-1304
Copy link

Notes for Reviewers

This PR fixes #341

Changes Made

  • Removed invalid default array at schema root level from capability.json
  • Fixed JSON Schema design issue that contained hardcoded capability objects
  • Defaults are properly handled in component.json schema where they belong
  • Resolves invalid schema structure per issue requirements

Testing

  • ✅ JSON syntax validation passed
  • ✅ TypeScript build successful
  • ✅ No breaking changes to schema references

Signed commits

  • Yes, I signed my commits.

- 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]>
Copy link

welcome bot commented Jul 30, 2025

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.
Be sure to double-check that you have signed your commits. Here are instructions for making signing an implicit activity while performing a commit.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 of capability.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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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]>
@saksham-1304
Copy link
Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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]>
@saksham-1304
Copy link
Author

@aabidsofi19
@leecalcote
Please take a look on this PR

@vr-varad
Copy link
Member

vr-varad commented Aug 5, 2025

Thank you for your contribution!!
If this work is complete, this is a good item to add to the weekly Meshery Development meeting agenda. You can add this item in the doc, attend, and present it. Meeting details at https://meet.layer5.io/meshery.

Copy link
Member

@leecalcote leecalcote left a 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.

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.

Remove errant defaults in capabilities.json schema

3 participants