kubernetes-client / c

Official C client library for Kubernetes
Apache License 2.0
146 stars 46 forks source link

[Fix Bug] If the data type of query parameter is "int" or "bool" in OpenAPI Specification, the request url will not be generated correctly #18

Closed ityuhui closed 4 years ago

ityuhui commented 4 years ago

There is a defect in API functions generated by OpenAPI-generator/c

For example, if we call below function to get the 10 pods:

CoreV1API_listNamespacedPod(...
                                           10,   /* limit */
...);

The url generated by this function is:

"https://ip:6443/api/v1/namespaces/default/pods?limit=P.xUUU"

But the right url should be:

"https://ip:6443/api/v1/namespaces/default/pods?list=10"

I have fixed this issue at PR https://github.com/OpenAPITools/openapi-generator/pull/6652

Now re-run the code generator and merge back to kubernetes-client/c.

ityuhui commented 4 years ago

/cc @brendandburns

brendandburns commented 4 years ago

/lgtm /approve

k8s-ci-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, ityuhui

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-client/c/blob/master/OWNERS)~~ [brendandburns,ityuhui] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment