Skip to content
This repository was archived by the owner on Nov 6, 2018. It is now read-only.

Differentiate between missing and empty arrays #190

@dhirajsb

Description

@dhirajsb

The model currently initializes all array fields with new ArrayList<...>, which makes it difficult to know whether the field was empty or not set at all in the original json/yaml source.

This causes a serious issue in k8 client JSON patch request, since it generates a different request for the two cases.

If the array is missing, it generates a patch request to add a new array if it exists and to set the element at '0' if its empty respectively.

K8 model should distinguish the two use cases, by lazily initializing all collections on add calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions