Skip to content

Commit 13b0de1

Browse files
authored
Add JSON marshaling for non-CRD types (#3345)
We have this for CRD types, where it is strictly required to work with k8s, but not for our other types. This makes it problematic to marshal json for these types. Note you can directly use protobuf json library, but this doesn't work for nested types, hence the desire to have these. Low cost, some value.
1 parent 27d505c commit 13b0de1

File tree

6 files changed

+866
-0
lines changed

6 files changed

+866
-0
lines changed

buf.gen-noncrd.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ plugins:
99
- name: docs
1010
out: .
1111
opt: warnings=false,dictionary=./dictionaries/en-US,custom_word_list=./dictionaries/custom.txt,per_file=true,mode=html_fragment_with_front_matter
12+
- name: golang-jsonshim
13+
out: .
14+
opt: paths=source_relative

mcp/v1alpha1/metadata_json.gen.go

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcp/v1alpha1/resource_json.gen.go

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)