From a5edfb025a613af376e5ee10d42b6eec7951c0a4 Mon Sep 17 00:00:00 2001 From: Nilansh Bansal Date: Mon, 6 May 2024 16:30:29 +0530 Subject: [PATCH] fix: authenticationType field saved to database (#33196) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description With the introduction of FromRequest for the create datasource API in [this](https://github.com/appsmithorg/appsmith/pull/33039) PR, we have restricted the fields that will be accepted from the client in the request body. Due to this the `authenticationType` field was not getting accepted from the client in the create datasource API, which lead to the failure of airtable queries. This PR allows the acceptance of `authenticationType` field from the client. Discussions [here](https://theappsmith.slack.com/archives/CTHN8GX5Y/p1714974437746959). Fixes #33184 ## Automation /ok-to-test tags="@tag.Datasource" ### :mag: Cypress test results > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: > Commit: a292aa075d3598389410b5c201f58c489fd2dfc2 > Cypress dashboard: Click here! > The following are new failures, please fix them before merging the PR:
    >
  1. cypress/e2e/Regression/ServerSide/QueryPane/DSDocs_Spec.ts
> To know the list of identified flaky tests - Refer here ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --- .../java/com/appsmith/external/models/AuthenticationDTO.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/AuthenticationDTO.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/AuthenticationDTO.java index 37e588c3ca..e9fe57a845 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/AuthenticationDTO.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/AuthenticationDTO.java @@ -1,6 +1,7 @@ package com.appsmith.external.models; import com.appsmith.external.constants.Authentication; +import com.appsmith.external.views.FromRequest; import com.appsmith.external.views.Views; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -40,7 +41,7 @@ public class AuthenticationDTO implements AppsmithDomain { IN_PROGRESS_PERMISSIONS_GRANTED }; - @JsonView(Views.Public.class) + @JsonView({Views.Public.class, FromRequest.class}) String authenticationType; @JsonView(Views.Public.class)