Conversation
Summary of ChangesHello, 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! This pull request enhances the project's documentation by introducing and explaining the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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
|
There was a problem hiding this comment.
Code Review
This pull request updates the documentation to include the new rfl::Deprecated feature. The changes are a good addition, but I've found a couple of areas for improvement. In README.md, an example was updated, but the corresponding JSON schema was not, leading to an inconsistency. In docs/json_schema.md, the example for rfl::Deprecated shows a deprecated field as required, which is an uncommon pattern. I've suggested making the deprecated field optional and updating the schema to reflect a more realistic use case.
README.md
Outdated
| std::vector<Person>> | ||
| children; | ||
| float salary; | ||
| rfl::Deprecated<"Use Salary Instead", "Wage in dollars", int> wage; |
There was a problem hiding this comment.
With the addition of the wage field, the JSON schema example shown below is now out of date. Please update it to include the new wage field, which should be marked as deprecated in the schema.
The updated schema should look like this:
{"$schema":"https://json-schema.org/draft/2020-12/schema","$ref":"#/$defs/Person","$defs":{"Person":{"type":"object","properties":{"children":{"type":"array","description":"The person's children. Pass an empty array for no children.","items":{"$ref":"#/$defs/Person"}},"email":{"type":"string","description":"Must be a proper email in the form xxx@xxx.xxx.","pattern":"^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$"},"first_name":{"type":"string"},"last_name":{"type":"string"},"salary":{"type":"number"},"wage":{"type":"integer","description":"Wage in dollars","deprecated":true,"deprecationMessage":"Use Salary Instead"}},"required":["children","email","first_name","last_name","salary","wage"]}}}| "first_name": { | ||
| "type": "string", | ||
| "description": "The person's first name", | ||
| "deprecated": true, | ||
| "deprecationMessage": "Use 'full_name' instead." | ||
| }, | ||
| "full_name": { | ||
| "type": "string", | ||
| "description": "The person's full name" | ||
| }, | ||
| "salary": { | ||
| "type": "number" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "first_name", | ||
| "full_name", | ||
| "salary" | ||
| ] |
There was a problem hiding this comment.
Following the suggestion to make first_name optional, the JSON schema should be updated. The first_name property should allow null values, and it should be removed from the required array.
"first_name": {
"description": "The person's first name",
"deprecated": true,
"deprecationMessage": "Use 'full_name' instead.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"full_name": {
"type": "string",
"description": "The person's full name"
},
"salary": {
"type": "number"
}
},
"required": [
"full_name",
"salary"
]Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
No description provided.