k8s-api icon indicating copy to clipboard operation
k8s-api copied to clipboard

Opt out of key rewriting

Open vvvvalvalval opened this issue 1 year ago • 0 comments

It looks like this library does non-trivial key rewriting when (de)-serializing JSON: transforming strings to keywords, kebab-case, etc.

Could we opt out of this? When it comes to API wrappers, some users (myself included) favor straightforwardness over prettiness.

So rather than write:

{:kind    :Namespace
 :action  :list
 :request {:namespace "default"
           :body      {:api-version "v1"}}}

... I would much rather write:

{:kind    :Namespace
 :action  :list
 :request {"namespace" "default"
           "body"      {"apiVersion" "v1"}}}

thus enabling more straightforward transformation between Clojure expressions and, say, JSON files passed to kubectl.

vvvvalvalval avatar Jul 05 '23 08:07 vvvvalvalval