From 96230d1eb95c8c99e4b42022bac5fc9cf2b3a455 Mon Sep 17 00:00:00 2001 From: Chad Unrein Date: Wed, 11 Oct 2023 12:29:44 -0500 Subject: [PATCH] add omitempty where missing and changie changes --- .changes/unreleased/ENHANCEMENTS-20231011-122738.yaml | 6 ++++++ .changes/unreleased/FEATURES-20231006-135721.yaml | 3 +-- bastionzero/service/targets/dbauthconfig/dbauthconfig.go | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changes/unreleased/ENHANCEMENTS-20231011-122738.yaml diff --git a/.changes/unreleased/ENHANCEMENTS-20231011-122738.yaml b/.changes/unreleased/ENHANCEMENTS-20231011-122738.yaml new file mode 100644 index 0000000..c2fdee8 --- /dev/null +++ b/.changes/unreleased/ENHANCEMENTS-20231011-122738.yaml @@ -0,0 +1,6 @@ +kind: ENHANCEMENTS +body: 'targets/database: Add new field DatabaseAuthenticationConfig and deprecate + SplitCert and DatabaseType' +time: 2023-10-11T12:27:38.297052484-05:00 +custom: + Issues: "40" diff --git a/.changes/unreleased/FEATURES-20231006-135721.yaml b/.changes/unreleased/FEATURES-20231006-135721.yaml index 4a59b4f..9cba31d 100644 --- a/.changes/unreleased/FEATURES-20231006-135721.yaml +++ b/.changes/unreleased/FEATURES-20231006-135721.yaml @@ -1,6 +1,5 @@ kind: FEATURES -body: 'targets/database: Add new field DatabaseAuthenticationConfig and deprecate - SplitCert and DatabaseType' +body: 'targets/database: Add support for GET list of database authentication configs' time: 2023-10-06T13:57:21.309141752-05:00 custom: Issues: "40" diff --git a/bastionzero/service/targets/dbauthconfig/dbauthconfig.go b/bastionzero/service/targets/dbauthconfig/dbauthconfig.go index c89b4e8..06fdffe 100644 --- a/bastionzero/service/targets/dbauthconfig/dbauthconfig.go +++ b/bastionzero/service/targets/dbauthconfig/dbauthconfig.go @@ -6,8 +6,8 @@ package dbauthconfig // /api/v2/targets/database/supported-database-configs and then one of the returned // configurations is used in any subsequent create or update request as needed. type DatabaseAuthenticationConfig struct { - AuthenticationType *string `json:"authenticationType"` - CloudServiceProvider *string `json:"cloudServiceProvider"` - Database *string `json:"database"` - Label *string `json:"label"` + AuthenticationType *string `json:"authenticationType,omitempty"` + CloudServiceProvider *string `json:"cloudServiceProvider,omitempty"` + Database *string `json:"database,omitempty"` + Label *string `json:"label,omitempty"` }