saveourtool/save-cloud

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

Open

#1,132 建立於 2022年9月1日

在 GitHub 查看
 (0 留言) (0 反應) (1 負責人)Kotlin (4 fork)github user discovery
backlogenhancementgood first issuerefactoring

倉庫指標

Star
 (38 star)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南