[rest] Changed property type to Boolean to allow null values (#1010)

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
pull/1023/head
Christoph Weitkamp 2019-09-02 16:55:43 +02:00 committed by Kai Kreuzer
parent fa416be057
commit 4ccaa8b38e
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ public class EnrichedItemDTO extends ItemDTO {
public StateDescription stateDescription;
public CommandDescription commandDescription;
public Map<String, Object> metadata;
public boolean editable;
public Boolean editable;
public EnrichedItemDTO(ItemDTO itemDTO, String link, String state, String transformedState,
StateDescription stateDescription, CommandDescription commandDescription) {

View File

@ -165,7 +165,7 @@ public class ItemResourceOSGiTest extends JavaOSGiTest {
Response response = itemResource.getItems(null, null, "MyTag", null, false, "type,name");
JsonElement result = parser.parse(IOUtils.toString((InputStream) response.getEntity()));
JsonElement expected = parser.parse("[{editable: true, type: \"Switch\", name: \"Switch\"}]");
JsonElement expected = parser.parse("[{type: \"Switch\", name: \"Switch\"}]");
assertEquals(expected, result);
}