Pull request #29: RED-2320: Fixed return dictionary entries
Merge in RED/persistence-service from RED-2320 to master * commit '7f923978fff110616cb01f0e2e5cfd3a8638a82d': RED-2320: Fixed return dictionary entries
This commit is contained in:
commit
8a63172b5c
@ -207,7 +207,10 @@ public class DictionaryController implements DictionaryResource {
|
||||
|
||||
@Override
|
||||
public Type getDictionaryForType(@PathVariable(TYPE_PARAMETER_NAME) String typeId) {
|
||||
return convert(dictionaryPersistenceService.getType(typeId), Type.class);
|
||||
var entity = dictionaryPersistenceService.getType(typeId);
|
||||
var target = convert(entity, Type.class);
|
||||
target.setEntries(convert(entity.getEntries(), DictionaryEntry.class));
|
||||
return target;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -42,6 +42,8 @@ public class TypeTest extends AbstractPersistenceServerServiceTest {
|
||||
|
||||
var loadedType = dictionaryClient.getDictionaryForType(type.getId());
|
||||
|
||||
assertThat(loadedType.getEntries().size()).isEqualTo(3);
|
||||
|
||||
assertThat(loadedType.getVersion()).isGreaterThan(type.getVersion());
|
||||
|
||||
List<DictionaryEntry> dict = dictionaryClient.getEntriesForType(type.getId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user