Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Refactor GenericMap to prevent managedField issues #2080

Merged
merged 2 commits into from
Sep 9, 2023

Commits on Sep 8, 2023

  1. Use a struct for GenericMaps

    Switch GenericMap from a named `map[string]interface{}` type
    to a struct with a Data field. This allows us to override the openapi
    spec once, at the type level, instead of retroactively at runtime for
    each new field of type GenericMap added to our API structs.
    
    This prevents the "managedFields" log that occurs when we forget to add
    new fields to the OpenAPI modification logic.
    
    Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>
    njhale committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    29cd567 View commit details
    Browse the repository at this point in the history
  2. Make DeepCopy compatible with old named map type usages

    Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>
    njhale committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    258f88d View commit details
    Browse the repository at this point in the history