From edda4f8bf9268f3017ae0c385765e8af4a274136 Mon Sep 17 00:00:00 2001 From: Michael Zalimeni Date: Wed, 19 Jul 2023 11:57:09 -0400 Subject: [PATCH] [NET-3700] add `omitempty` to api prepared query targets (#18184) add `omitempty` to api prepared query targets Manual backport of c2bbe67714ee7c603447e18c25ad391b8de6226e. Co-authored-by: Nick Irvine <115657443+nfi-hashicorp@users.noreply.github.com> --- api/prepared_query.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/prepared_query.go b/api/prepared_query.go index bb40e6a7fd..8ebc852f3a 100644 --- a/api/prepared_query.go +++ b/api/prepared_query.go @@ -32,11 +32,11 @@ type QueryFailoverTarget struct { // Partition specifies a partition to try during failover // Note: Partition are available only in Consul Enterprise - Partition string + Partition string `json:",omitempty"` // Namespace specifies a namespace to try during failover // Note: Namespaces are available only in Consul Enterprise - Namespace string + Namespace string `json:",omitempty"` } // QueryDNSOptions controls settings when query results are served over DNS.