saveourtool/save-cloud

Don't use `@Entity`s directly for (de)serialization, use DTOs instead

Open

#1 132 ouverte le 1 sept. 2022

Voir sur GitHub
 (0 commentaires) (0 réactions) (1 assigné)Kotlin (4 forks)github user discovery
backlogenhancementgood first issuerefactoring

Métriques du dépôt

Stars
 (38 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

Certain classes can be marked as opted-out of serialization (maybe @JsonIgnoreType?) and their usages in transport replaced with

  • Execution -> ExecutionDto
  • User -> UserInfo (consider #1130 as an example of why this is needed)

Another idea would be to create a custom detekt rule that would check that

  • methods annotated with various @...Mapping return not-@Entity class or Mono
  • bodyValue(), ObjectMapper.writeValue etc. are used with not-@Entity classes

Guide contributeur