epam / badgerdoc

Apache License 2.0
31 stars 26 forks source link

Annotation service: add hierarchy support to categories #2

Open khyurri opened 1 year ago

khyurri commented 1 year ago

Back-end

Hierarchy support scheme contains:

Example:

  "data": [
    {
      "name": "Child2",
      "parent": "Child1",
      "type": "box",
      "id": "Child2",
      "is_leaf": true,
      "parents": [
        {
          "name": "Root",
          "type": "box",
          "id": "Root",
          "is_leaf": false
        },
        {
          "name": "Child1",
          "parent": "root",
          "type": "box",
          "id": "Child1",
          "is_leaf": false
        }
      ]
    }
  ]

Front-end

Filterlib LTREE support

Supported operations: children - returns children of value, to get only root nodes set value as root children_recursive - returns all children down the tree parent - returns parent parents_recursive - returns all parents

Others

khyurri commented 1 year ago

Known bugs:

MagicTearsAsunder commented 1 year ago

Known bugs:

  • [ ] Unable to create new category from /categories page with Internal server error Example request: {"id":"t-root","name":"t-root","metadata":{"color":"#876565"},"type":"box","parent":null}

Special symbols are not allowed in Ltree path. Allowed: letters [a-z, A-Z], digits [0-9] and underscore ("_"). Solution - add validation on CategoryResponseSchema.

khyurri commented 1 year ago

@MagicTearsAsunder