Tests for recent C fixes#20200
Conversation
The recent commit 47665aa ("Fix a few issues with the C generator (part 1 version 2) (OpenAPITools#14434)") didn't include any test schemas. Add them now, as requested: OpenAPITools#14434 (comment)
|
By the way, there are a few warnings in the test build that seem to be a recent regression: |
| type: string | ||
| xml: | ||
| name: Category | ||
| Preference: |
There was a problem hiding this comment.
thanks for adding a new test schema
have you added the new files too using git add?
There was a problem hiding this comment.
What new files? Did I mess something up? I thought I just needed to update the schema with the new cases that were failing.
There was a problem hiding this comment.
Oh, you mean for the samples? Yes, I added everything.
There was a problem hiding this comment.
from the build error message:
[ 66%] Building C object CMakeFiles/openapi_petstore.dir/model/tag.c.o
[ 73%] Building C object CMakeFiles/openapi_petstore.dir/model/user.c.o
In file included from /home/runner/work/openapi-generator/openapi-generator/samples/client/petstore/c/model/user.c:4:
/home/runner/work/openapi-generator/openapi-generator/samples/client/petstore/c/model/user.h:19:10: fatal error: preference.h: No such file or directory
19 | #include "preference.h"
| ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/openapi_petstore.dir/build.make:219: CMakeFiles/openapi_petstore.dir/model/user.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/openapi_petstore.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
looks like the c petstore is trying to import preference (enum) but no luck.
does the C petstore client support enum models? or it only supports inline enum?
There was a problem hiding this comment.
You are right, I messed up at some point during rebasing. I'll send the rest of the samples now.
There was a problem hiding this comment.
I just added the missing files, sorry for the confusion.
There was a problem hiding this comment.
can you please update the samples one more time?
There was a problem hiding this comment.
Ok, done. Sorry, I have no idea how I keep messing this up.
There was a problem hiding this comment.
No problem bro. Thanks for adding the test.
|
cc @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) |
|
lgtm. let's give it a try |
These are the updated test schemas for the recently merged C generator patches. As requested by @wing328 here:
#14434 (comment)