fix: KubernetesObjectSerializer::deserialize() should support list api#2125
fix: KubernetesObjectSerializer::deserialize() should support list api#2125k8s-ci-robot merged 2 commits intokubernetes-client:masterfrom
Conversation
thestupd
commented
Dec 24, 2024
- Added a new KubernetesObjectList class to handle list APIs with appropriate schema attributes (apiVersion, kind, metadata, and items).
- Updated the deserialization logic to instantiate and populate KubernetesObjectList instances when appropriate.
- Added test cases to validate the deserialization of Kubernetes object lists, ensuring correctness and compatibility with unknown object schemas.
|
Welcome @Empty21! |
|
The custom Serializer update in version Example: const responseList = await objectApi.list("foo", "bar", "default");
const firstItem = responseList.body.items[0];
// Modify some data
await objectApi.replace(firstItem); // This fails because the items in the list are not deserialized correctly. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, thestupd The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |