From 510cce5f8188b8f4b6b8f38a11192d62c9c89fd3 Mon Sep 17 00:00:00 2001 From: Steven Clark Date: Fri, 11 Aug 2023 16:17:00 -0400 Subject: [PATCH] Adjust the omitempty json flags within CIEPSResponse (#22305) - Remove the omitempty flag from issuer_ref, and add it to the warnings and error fields --- sdk/helper/certutil/cieps.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/helper/certutil/cieps.go b/sdk/helper/certutil/cieps.go index 382a4c20cf24..9943cf3977a5 100644 --- a/sdk/helper/certutil/cieps.go +++ b/sdk/helper/certutil/cieps.go @@ -134,11 +134,11 @@ func (req *CIEPSRequest) ParseUserCSR() error { // parse if unknown fields are sent. type CIEPSResponse struct { UUID string `json:"request_uuid"` - Error string `json:"error"` - Warnings []string `json:"warnings"` + Error string `json:"error,omitempty"` + Warnings []string `json:"warnings,omitempty"` Certificate string `json:"certificate"` ParsedCertificate *x509.Certificate `json:"-"` - IssuerRef string `json:"issuer_ref,omitempty"` + IssuerRef string `json:"issuer_ref"` StoreCert bool `json:"store_certificate"` GenerateLease bool `json:"generate_lease"` }