Skip to content

Separate a new path parameter resource_plural to avoid key conflict #278

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

Merged

Conversation

yue9944882
Copy link
Member

@yue9944882 yue9944882 commented Feb 4, 2025

Some developers are confused by the "hairspace" character for the document-only listCustomObjectForAllNamespaces API model (Ref: kubernetes-client/java#3890) as the generated API method is not callable, Hence this PR adopts an alternative workaround from: OAI/OpenAPI-Specification#182 (comment)

Here is an example of how the generated code looks like:

yue9944882/java#102

https://github.com/yue9944882/java/blob/automated-generate-28b5822c/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CustomObjectsApi.java#L3625

    /**
     *
     * list or watch namespace scoped custom objects
     * @param group The custom resource's group name (required)
     * @param version The custom resource's version (required)
     * @param resourcePlural The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
     * @return APIlistCustomObjectForAllNamespacesRequest
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OK </td><td>  -  </td></tr>
        <tr><td> 401 </td><td> Unauthorized </td><td>  -  </td></tr>
     </table>
     */
    public APIlistCustomObjectForAllNamespacesRequest listCustomObjectForAllNamespaces(String group, String version, String resourcePlural) {
        return new APIlistCustomObjectForAllNamespacesRequest(group, version, resourcePlural);
    }

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yue9944882

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 4, 2025
@yliaog
Copy link
Contributor

yliaog commented Feb 4, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 4, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7f27576 into kubernetes-client:master Feb 4, 2025
2 checks passed
kmambo pushed a commit to kmambo/kubernetes-client-generator that referenced this pull request Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants