Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add separate request/response views #32448

Merged
merged 14 commits into from
Apr 16, 2024
Prev Previous commit
Remove ToResponse
  • Loading branch information
sharat87 committed Apr 16, 2024
commit 85a5ba3b2fc6520e742f81d1a74eae8dcb2059c8
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.appsmith.external.models.Policy;
import com.appsmith.external.models.Property;
import com.appsmith.external.views.FromRequest;
import com.appsmith.external.views.ToResponse;
import com.appsmith.external.views.Views;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonView;
Expand Down Expand Up @@ -90,7 +89,7 @@ public class ActionCE_DTO implements Identifiable, Executable {

// this attribute carries error messages while processing the actionCollection
@Transient
@JsonView(ToResponse.class)
@JsonView(Views.Public.class)
List<ErrorDTO> errorReports;

@JsonView({Views.Public.class, FromRequest.class})
Expand All @@ -106,19 +105,19 @@ public class ActionCE_DTO implements Identifiable, Executable {
@JsonView({Views.Public.class, FromRequest.class})
List<Property> dynamicBindingPathList;

@JsonView(ToResponse.class)
@JsonView(Views.Public.class)
Boolean isValid;

@JsonView(ToResponse.class)
@JsonView(Views.Public.class)
Set<String> invalids;

@Transient
@JsonView(ToResponse.class)
@JsonView(Views.Public.class)
Set<String> messages = new HashSet<>();

// This is a list of keys that the client whose values the client needs to send during action execution.
// These are the Mustache keys that the server will replace before invoking the API
@JsonView(ToResponse.class)
@JsonView(Views.Public.class)
Set<String> jsonPathKeys;

@JsonView(Views.Internal.class)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Internal extends Public, Metadata, ExportUnpublished, ExportPublished
/**
* Used with JsonView annotation to denote that a field should be visible to the client.
*/
interface Public extends ToResponse {}
interface Public {}

/**
* Used with JsonView annotation to denote that a field should be exported when exporting the Domain/DTOs.
Expand Down
Loading