From 2a6885a5cb897e1824cdc1af8c5879151fa2f37f Mon Sep 17 00:00:00 2001 From: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:45:01 +0530 Subject: [PATCH] fix: Embedded datasource persistence changes for git. (#36109) --- .../java/com/appsmith/external/models/Datasource.java | 2 +- .../external/models/DatasourceConfiguration.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java index e2b41d1c8076..e067733a8094 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java @@ -54,7 +54,7 @@ public class Datasource extends GitSyncedDomain { String templateName; // This is only kept public for embedded datasource - @JsonView({Views.Public.class, FromRequest.class}) + @JsonView({Views.Public.class, FromRequest.class, Git.class}) DatasourceConfiguration datasourceConfiguration; @Transient diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/DatasourceConfiguration.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/DatasourceConfiguration.java index ee6c0097cf42..5a81b66b730c 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/DatasourceConfiguration.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/DatasourceConfiguration.java @@ -1,6 +1,7 @@ package com.appsmith.external.models; import com.appsmith.external.views.FromRequest; +import com.appsmith.external.views.Git; import com.appsmith.external.views.Views; import com.fasterxml.jackson.annotation.JsonView; import lombok.AllArgsConstructor; @@ -37,17 +38,17 @@ public class DatasourceConfiguration implements AppsmithDomain { Boolean sshProxyEnabled; - @JsonView({Views.Public.class, FromRequest.class}) + @JsonView({Views.Public.class, FromRequest.class, Git.class}) List properties; // For REST API. - @JsonView({Views.Public.class, FromRequest.class}) + @JsonView({Views.Public.class, FromRequest.class, Git.class}) String url; - @JsonView({Views.Public.class, FromRequest.class}) + @JsonView({Views.Public.class, FromRequest.class, Git.class}) List headers; - @JsonView({Views.Public.class, FromRequest.class}) + @JsonView({Views.Public.class, FromRequest.class, Git.class}) List queryParameters; public boolean isSshProxyEnabled() {