From 03684f7794c44d49c1ec5b59e7b035b4c5cedec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Pfeuffer?= Date: Tue, 16 Oct 2018 15:51:44 +0200 Subject: [PATCH] Do not render empty attributes --- .../src/main/java/sonia/scm/api/v2/resources/FileObjectDto.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/FileObjectDto.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/FileObjectDto.java index a9d67c2cf3..c183d731c6 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/FileObjectDto.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/FileObjectDto.java @@ -17,10 +17,12 @@ public class FileObjectDto extends HalRepresentation { private String name; private String path; private boolean directory; + @JsonInclude(JsonInclude.Include.NON_EMPTY) private String description; private long length; @JsonInclude(JsonInclude.Include.NON_EMPTY) private Instant lastModified; + @JsonInclude(JsonInclude.Include.NON_EMPTY) private SubRepositoryDto subRepository; @JsonInclude(JsonInclude.Include.NON_EMPTY) private String revision;