From 9793e1c1cd14369ef90386b5bfcecd25b8f272b0 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" <4903+rboyer@users.noreply.github.com> Date: Tue, 16 Nov 2021 12:28:34 -0600 Subject: [PATCH] api: ensure new partition fields are omit empty for back compat (#11585) --- .changelog/11585.txt | 3 +++ api/connect_intention.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changelog/11585.txt diff --git a/.changelog/11585.txt b/.changelog/11585.txt new file mode 100644 index 000000000..563a86aa6 --- /dev/null +++ b/.changelog/11585.txt @@ -0,0 +1,3 @@ +```release-note:bug +api: ensure new partition fields are omit empty for compatibility with older versions of consul +``` diff --git a/api/connect_intention.go b/api/connect_intention.go index 95be9ebb3..734d4ab0f 100644 --- a/api/connect_intention.go +++ b/api/connect_intention.go @@ -32,8 +32,8 @@ type Intention struct { // SourcePartition and DestinationPartition cannot be wildcards "*" and // are not compatible with legacy intentions. - SourcePartition string - DestinationPartition string + SourcePartition string `json:",omitempty"` + DestinationPartition string `json:",omitempty"` // SourceType is the type of the value for the source. SourceType IntentionSourceType