Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


 n/ndescriptioninputsexpected_result actual_result
1Insert dictionary with existed IDduplicated idERROR: duplicate key value violates unique constraint "dictionaries_pkey" Detail: Key (id)=(f98c9549-cdef-4df3-af2f-a8f8260c7a88) already exists.ERROR: duplicate key value violates unique constraint "dictionaries_pkey" Detail: Key (id)=(f98c9549-cdef-4df3-af2f-a8f8260c7a88) already exists.
2Insert dictionary with existed nameduplicated nameERROR: duplicate key value violates unique constraint "dictionaries_name_uniq" Detail: Key (name)=(TEST) already exists.ERROR: duplicate key value violates unique constraint "dictionaries_name_uniq" Detail: Key (name)=(TEST) already exists.
3Update dictionary with existed name
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
    "name": "COUNTRY",
    "isActive": true
}
422, Dictionary with such name already exists500,
{
"type": "internal_error"
}
4Update not active dictionary
422, Dictionary is not active200, dictionary is updated
5Update dictionary with empty values
{
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
    "values": "{}"
}
}
UNPROCESSABLE_ENTITY, 
"description": "Values should not be empty"
UNPROCESSABLE_ENTITY, 
"description": "Values should not be empty"
6Update dictionary with empty labels
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
    "labels": []
}
UNPROCESSABLE_ENTITY
"description": "Labels should not be empty"
200, labels are updated to empty
7Update dictionary add few same keys
{
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
    "values": "{\"one\":\"два\",\"one\":\"один\"}"
}
}
422, Keys are duplicated200, first values is inserted
8Update dictionary add few same tags
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
    "labels": ["SYSTEM", "SYSTEM"]
}
422, Labels are duplicated200, few same labels are added
9Update dictionary by ID which doesn't exist
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODc="
}
NOT_FOUND
Dictionary not found
NOT_FOUND
Dictionary not found
10Deactivate dictionary
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
 "isActive": false
}
200, dictionary is deactivated200, dictionary is deactivated
11Activate deactivated dictionary 
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
 "isActive": true
}

200, dictionary is activated

???
should we allow to activate dictionary

200, dictionary is activated
12Rename dictionary
"input": {
"id": "RGljdGlvbmFyeTpmOThjOTU0OS1jZGVmLTRkZjMtYWYyZi1hOGY4MjYwYzdhODg=",
    "name": "TEST1"
}
422, Name can't be changed
???
should we allow to change dictionary name
200, dictionary is renamed
13Filter dictionaries by tag
"filter": {
"label": "SYSTEM"
}
200, filtered by label200, filtered by label
14Filter dictionaries by name
"filter": {
"name": "test"
}
200, filtered by name200, filtered by name
15Filter dictionaries by values.key


16

Filter dictionaries by is_active
"filter": {
"isActive": true
}
200, filtered by isActive200, filtered by isActive