-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[BUG][C++][Pistache][Restbed] Array of objects does not generate model file #3271
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
@muttleyxd
To support free form objects in Pistache is easy, simply by mapping the so the include can be changed to All the issues you linked are related. |
I have a similar issue for Kotlin, when declaring array of objects (which have properties), model is not generated. openapi-generator version Errors: type: array description: List of status messages items: type: object properties: Code: type: string description: The actual Error Code value Command line used for generation openapi-generator-cli-4.2.1.jar org.openapitools.codegen.OpenAPIGenerator generate -g eaip-kotlin-spring -i problem.yaml --skip-validate-spec --generate-alias-as-model Output: Errors: type: array description: List of status messages properties: items: type: object properties: Code: type: string description: The actual Error Code value My problem is that I am not owner of this API, so I need to find some arguments why do I need to wrap everything into properties, because an original YAML is totally fine from OpenAPI point of view. |
Bug Report Checklist
Description
Actual:
When declaring array of objects (which have properties), model is not generated.
It will result in
Object.h
include missing forcpp-restbed-server
andcpp-pistache-server
Expected:
model/ProblematicArrayType.h (and .cpp) are created
openapi-generator version
4.0.2
OpenAPI declaration file content or url
Command line used for generation
openapi-generator-cli generate -i problem.yaml -g cpp-pistache-server -o generated_pistache
openapi-generator-cli generate -i problem.yaml -g cpp-restbed-server -o generated_restbed
Steps to reproduce
Related issues/PRs
#2769 #1827 #1637
Suggest a fix
No idea how to fix it, but the issue happens both on Pistache and Restbed
The text was updated successfully, but these errors were encountered: