python
python copied to clipboard
Target_Port parameter type reference is a broken link
Link to the issue (please include a link to the specific documentation or example): https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ServicePort.md
Description of the issue (please include outputs or screenshots if possible): The documentation of the V1ServicePort defines target_port type as object. The link on the word object links is broken so the audience cant understand what that object is This is the link https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/.md on the object word
Thanks
@roycaihw is the redirection link this one https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ServiceBackendPort.md to replace with
target_port
is an IntOrString.
Fundamentally this is a shortcoming of Kubernetes using OpenAPI v2, which cannot properly express the schema of an "int or string" type, nor let us generate the correct client-side validation. People had put workarounds for the client-side validation (https://github.com/kubernetes-client/gen/pull/26, https://github.com/kubernetes-client/gen/pull/30), but the documentation became somewhat broken (also see Java example)
A short-term fix for the Python client can be appending the documentation of IntOrString to v["description"]. Other suggestions are welcome.
/help
@roycaihw: This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
In response to this:
target_port
is an IntOrString.Fundamentally this is a shortcoming of Kubernetes using OpenAPI v2, which cannot properly express the schema of an "int or string" type, nor let us generate the correct client-side validation. People had put workarounds for the client-side validation (https://github.com/kubernetes-client/gen/pull/26, https://github.com/kubernetes-client/gen/pull/30), but the documentation became somewhat broken (also see Java example)
A short-term fix for the Python client can be appending the documentation of IntOrString to v["description"]. Other suggestions are welcome.
/help
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@jefftree I wonder if you know any effort to change the schema of IntOrString when Kubernetes goes OpenAPI v3. Currently it looks like this:
"io.k8s.apimachinery.pkg.util.intstr.IntOrString": {
"description": "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.",
"format": "int-or-string",
"type": "string"
},
OpenAPI V3 should be able to use the new oneOf annotation and correctly indicate the type as oneOf {int, string}.
Thanks for bringing this up, I was actually unaware of this struct and originally thought all IntOrString operations went through the x-int-or-string extension. Will add it to the agenda for OpenAPI :)
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/assign
/assign
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
Hi, just want to give a quick update around OpenAPI V3. OpenAPI v3 is now beta in kubernetes and will be enabled by default. The spec is split by group/version and the discovery endpoint can be found at /openapi/v3
.
We also have generated files committed to the k/k repo split by group version. IntOrString is properly defined in OpenAPI V3 (https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/v3/apis__apps__v1_openapi.json#L6034-L6046), let me know if I can provide any help with integration.
/remove-lifecycle rotten
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
Hello! I want to know if anyone working on this issue.
could you tell me the issue as it's my first time on an open source project? as I couldn't understand the upper conversation cuz it's little cryptic to me.
/remove lifecycle rotten
I want to start contributing in this project. And I am a total beginner. So it would be great if u could suggest some resources to start with.
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Reopen this issue or PR with
/reopen
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closing this issue.
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied- After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied- After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closedYou can:
- Reopen this issue or PR with
/reopen
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.