RED-2320: Fixed return dictionary entries
This commit is contained in:
parent
cabe693cc3
commit
7f923978ff
@ -207,7 +207,10 @@ public class DictionaryController implements DictionaryResource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type getDictionaryForType(@PathVariable(TYPE_PARAMETER_NAME) String typeId) {
|
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
|
@Override
|
||||||
|
|||||||
@ -42,6 +42,8 @@ public class TypeTest extends AbstractPersistenceServerServiceTest {
|
|||||||
|
|
||||||
var loadedType = dictionaryClient.getDictionaryForType(type.getId());
|
var loadedType = dictionaryClient.getDictionaryForType(type.getId());
|
||||||
|
|
||||||
|
assertThat(loadedType.getEntries().size()).isEqualTo(3);
|
||||||
|
|
||||||
assertThat(loadedType.getVersion()).isGreaterThan(type.getVersion());
|
assertThat(loadedType.getVersion()).isGreaterThan(type.getVersion());
|
||||||
|
|
||||||
List<DictionaryEntry> dict = dictionaryClient.getEntriesForType(type.getId());
|
List<DictionaryEntry> dict = dictionaryClient.getEntriesForType(type.getId());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user