Open mlebihan opened 2 months ago
@mlebihan thanks for offering help to fix these issue. Can you please PM me via Slack when you've time in the coming week?
https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g
Object for C++ pistache looks working correctly with:
(my test isn't accurate and working, but the generation looks to be)
Many generators encounter the same problem against properties having a
"type": "object"
or'type": ["string", "number",...]
, and another form with arrays that lead to missing sources files at generation time:being declared as
#include
but noObject.h
,Object.cpp
,AnyType.h
,AnyType.cpp
,Set.h
,Set.cpp
[for C++ example], are generated aside.I am in need of correcting this problem, and I would like to solve it for the most generators possible. All, if possible.
They are already a lot of issues created for this trouble: one for one specific generator each time. But I think it's useful to gather here all the knowledge we have about it.
I begin focusing on it, and here's what I've attempted in a fork branch, to create a test that fails for the first of these problems:
https://github.com/OpenAPITools/openapi-generator/compare/master...mlebihan:openapi-generator:any_type and I generate from a custom petstore, where I've added to
Pet
definition a:Debugging things, it looks that
C
generator does generates itsobject.h
andobject.c
files:But
cpp-pistache
generator doesn't generate its equivalentObject.h
andObject.cpp
:Depending on the issues I've read about this, they are various advices. Can you tell me:
If once, these sources were generated but an event (around
4.1.0
version of openapi generator? earlier?) made that it doesn't work anymore?If it's just a configuration issue : the missing sources exist (for each generator) but they just aren't "pushed" at generation time, for any reason ; or if at the opposite, they are entirely missing? "We don't know yet (we haven't written yet), in example, how to perform a C++ serialization in json of an Object?
What do you recommend me, to solve this problem?
Thanks!