In summary, the change comprises adding `JsonView` annotations on domain/model fields, controller methods, and arguments. applying JsonView annotation on controller methods will include fields which are marked with the same view in domain objects. Similarly, usage on controller method arguments will only deserialize the fields which are marked with same view in Domain object, which is helpful in case we don't want the client to send some fields for security reasons. This change replaces the previous use of JsonIgnore for restricting fields in API response and allows for more flexibility and will enable us to have fine-grain control over fields serialized for different contexts, such as API response, export, and import. The following views are defined as of now. `View.Internal` - View used to serialize for internal use. It inherits from `Views.Public` and `Views.Export`, so it will also include those fields. `Views.Public` - View used for API request/response. `Views.Export` - View used for making field exportable, like in the case of Git sync and file export. Also, we can define more views by adding an interface inside the Views class and Views can also inherit fields marked with different view by simple interface inheritance. A small tutorial on JsonView - [Jackson JSON Views | Baeldung](https://www.baeldung.com/jackson-json-view-annotation) --------- Signed-off-by: Sidhant Goel <sidhant@appsmith.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> |
||
|---|---|---|
| .. | ||
| .run | ||
| appsmith-git | ||
| appsmith-interfaces | ||
| appsmith-plugins | ||
| appsmith-server | ||
| envs | ||
| mongo-seed | ||
| reactive-caching | ||
| scripts | ||
| .gitignore | ||
| build.sh | ||
| buildpack-run.sh | ||
| docker-compose.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| pom.xml | ||
| Procfile | ||
| README.md | ||
| system.properties | ||
Appsmith Server
This is the server-side repository for the Appsmith framework.
For details on setting up your development machine, please refer to this Setup Guide.