From 86609ed11ec83e8308f6a0f3cbcdfa662b9bff0d Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 4 Apr 2024 17:59:23 +0200 Subject: [PATCH] Set json typename for TagDto --- .../java/edu/ntnu/idatt2105/quizapp/dto/quiz/TagDto.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/ntnu/idatt2105/quizapp/dto/quiz/TagDto.java b/src/main/java/edu/ntnu/idatt2105/quizapp/dto/quiz/TagDto.java index 2557cdf..292f2df 100644 --- a/src/main/java/edu/ntnu/idatt2105/quizapp/dto/quiz/TagDto.java +++ b/src/main/java/edu/ntnu/idatt2105/quizapp/dto/quiz/TagDto.java @@ -1,6 +1,7 @@ package edu.ntnu.idatt2105.quizapp.dto.quiz; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -13,10 +14,7 @@ * @version 1.0 * @since 2024-03-30 */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type" -) +@JsonTypeName("TagDTO") @Data @Builder @AllArgsConstructor