From ceeb032a1923209353296a28db20468801db729d Mon Sep 17 00:00:00 2001 From: Achim Christ Date: Tue, 7 Jan 2025 08:58:43 +0000 Subject: [PATCH] fix: mark optional `storage` and `limit` params as 'omitempty' --- internal/interfaces/svm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/interfaces/svm.go b/internal/interfaces/svm.go index e1fccc5c..5fc39c1b 100644 --- a/internal/interfaces/svm.go +++ b/internal/interfaces/svm.go @@ -31,7 +31,7 @@ type SvmResourceModel struct { MaxVolumes string `mapstructure:"max_volumes,omitempty"` Name string `mapstructure:"name,omitempty"` SnapshotPolicy SnapshotPolicy `mapstructure:"snapshot_policy,omitempty"` - Storage Storage `mapstructure:"storage"` + Storage Storage `mapstructure:"storage,omitempty"` SubType string `mapstructure:"subtype,omitempty"` } @@ -44,7 +44,7 @@ type SvmGetDataSourceModel struct { MaxVolumes string `mapstructure:"max_volumes,omitempty"` Name string `mapstructure:"name"` SnapshotPolicy SnapshotPolicy `mapstructure:"snapshot_policy"` - Storage Storage `mapstructure:"storage"` + Storage Storage `mapstructure:"storage,omitempty"` SubType string `mapstructure:"subtype,omitempty"` UUID string `mapstructure:"uuid"` } @@ -61,7 +61,7 @@ type SnapshotPolicy struct { // Storage describes the resource data model. type Storage struct { - Limit int `mapstructure:"limit"` + Limit int `mapstructure:"limit,omitempty"` } // SvmDataSourceFilterModel describes the data source data model for queries.