-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[C++][cpp-restsdk] Array of objects are not well handled. Compilation failed #922
Comments
I also identify the "same" bug issue within an array of string, not only array of objects. I quoted "same" because the generated code is not done in the same way and the compilation error is not exactly the same. |
Anyone may work on this bug issue ? |
@CyrilleBenard requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AmfUpdateEventSubscriptionItem'
required: true
...
schemas:
AmfUpdateEventSubscriptionItem:
type: array
items: Changing above spec to below is solvable though. requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AmfUpdateEventSubscriptionItem'
required: true
...
schemas:
AmfUpdateEventSubscriptionItem:
type: object
properties:
prop1:
type: string
prop2:
type: string
@wing328 |
@CyrilleBenard |
Agree @etherealjoy |
Description
The use of an array of objects generates wrong C++ code that do not compile. This is strange because I already tested this feature in the past with a previous generator version and it did not failed. It is almost a regression.
The compilation error looks like :
NOTE: The object properties type does not interfere. I mean it also appears in case the properties are string or integer. See below
openapi-generator version
Current master 3.2.3-SNAPSHOT
OpenAPI declaration file content or url
Command line used for generation
Generate :
Compile :
Steps to reproduce
N/A
Related issues/PRs
N/A
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: