Comments (9)
Thank you for reporting this issue @lordgamez
from c.
I believe that you need to add a section here:
That looks like:
{{#vars}}
{{^isPrimitiveType}}
{{#isModel}}
{{^isEnum}}
{{^isFreeFormObject}}{{complexType}}{{/isFreeFormObject}}{{#isFreeFormObject}}object{{/isFreeFormObject}}_t *{{name}}_local_nonprim = NULL;
{{/isEnum}}
{{/isModel}}
{{/vars}}
And then remove the line here:
https://github.com/OpenAPITools/openapi-generator/blob/bd8efe2f91761df866489c16e1c17870a8c88c5f/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache#L617
Hope that helps.
from c.
cc @ityuhui
I think this is a bug in the generated code. The function is free-ing the list metadata here:
c/kubernetes/model/v1_pod_list.c
Line 179 in 8eb6593
but any-place that goto end
is called, metadata_local_nonprim
hasn't been initialized yet.
We should either initialize that to NULL
at the top of the generated function, or remove that free code.
I think the right thing to do is to remove the free code, since it doesn't appear to be being used.
from c.
OK. I'll look at this code soon.
from c.
Some additional information on this is that I had the same problem with CoreV1API_listNamespace
call, so the problem is not specific to listing pods.
from c.
Thanks for the help! Although I don't have any experience with OpenAPI, can you point me to some documentation how to generate the API code?
from c.
I'll fix this issue according to @brendandburns' suggestion.
You don't need generate the API code by yourself unless you want to have a try. The guide can be found at #61 (comment)
from c.
Thanks @ityuhui, sorry I thought the comment was directed at me :) Still I'll check out the guide just for fun. :)
from c.
The upstream openapi-generator breaks the generating for C client recently.
Now I'm checking that issue OpenAPITools/openapi-generator#10725.
from c.
Related Issues (20)
- `sendInitialEvents` error HOT 14
- v0.8.0 release plan HOT 2
- CoreV1API_listPodForAllNamespaces/CoreV1API_listNamespacedPod API return 422 error HOT 19
- Is it possible to change the cURL HTTP accpet header? HOT 1
- Creating Deployment Patch using the AppsV1API_patchNamespacedDeployment HOT 3
- doc: Some parameter types of functions in the API documentation are wrong
- How to get label key and value? HOT 3
- v0.9.0 release plan HOT 2
- libwebsockets make fails with error: conflicting types for ‘lws_tls_server_abort_connection HOT 4
- How to compile as static .a file? HOT 7
- v1_pod_list_parseFromJSON does not parse pod statuses HOT 7
- CoreV1API_readNamespacedPodLog doesn't work and contains a segfault HOT 9
- Both Custom Resource Definitions and Custom Resources strip the spec from their object. HOT 1
- Feature Request: Decoupling parsing from network message passing HOT 5
- Remove printf from internal function HOT 1
- Issue with Running list_pod_incluster Example Code - HTTP 422 HOT 5
- Conan support HOT 2
- Using the operating system provided websockets library HOT 2
- Need bump actions/checkout@v3 HOT 1
- v0.10.0 release plan HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c.