-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[cpp] Fix Nested Map & Additional Properties Support #22639
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?
Conversation
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.
1 issue found across 23 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTinyClientCodegen.java">
<violation number="1" location="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTinyClientCodegen.java:281">
P1: Potential NullPointerException: `ModelUtils.getAdditionalProperties(resolved)` can return null when `additionalProperties` is a boolean or not present. Consider adding a null check before calling `getTypeDeclaration(inner)`.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
...openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTinyClientCodegen.java
Show resolved
Hide resolved
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.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java">
<violation number="1" location="modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java:398">
P2: Method inserted in wrong location - this separates the existing JavaDoc for `getTypeDeclaration()` from its method. The `isPureMapSchema()` helper should be placed either before that JavaDoc block or after the `getTypeDeclaration()` method to preserve the documentation association.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
...napi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java
Show resolved
Hide resolved
|
Ready for review @muttleyxd @aminya |
Fixes #12737
map<string, map<string, string>>was broken.Summary by cubic
Fix nested map generation in C++ (Qt, RestSDK, Tiny) so map<string, map<string, string>> types resolve and compile. Also add additionalProperties support to cpp-restsdk models to capture and serialize unknown fields. Fixes #12737.
Bug Fixes
New Features
Written for commit d5f82ef. Summary will update on new commits.