Dhall OpenAPI to generate merge functions for Kubernetes objects?

There are custom values in the kubernetes OpenAPI specification that indicate how one might merge various pieces of data. While a deep merge is more complicated to implement generically, I would find a Dhall function that performs a strategic merge on Dhall-Kubernetes resources extremely useful.

There was discussion about something like this in https://github.com/dhall-lang/dhall-lang/issues/114.

I think the complication of the matter is mostly related to the fact that the dhall-kubernetes code is generated by dhall-openapi and there isn’t really an intermediate representation that can be cleanly used to implement this, as I understand it to be exposed right now.