gentics / mesh-incubator

Project which is home for planned enhancements for Gentics Mesh
3 stars 0 forks source link

Allow changing of the rootNode's schema #241

Open bernhardriegler opened 4 years ago

bernhardriegler commented 4 years ago

Gentics Mesh Version, operating system, or hardware.

Problem

The schema of the root node can not be changed

Reproducer

Create new schema

curl 'https://demo.getmesh.io/api/v1/schemas' -H 'content-type: application/json' --data-binary '{"name":"new_folder","container":true,"autoPurge":false,"description":"Folder schema to create containers for other nodes.","displayField":"name","segmentField":"slug","urlFields":[],"fields":[{"name":"name","type":"string","label":"Name","required":false},{"name":"slug","type":"string","label":"Slug","required":false}]}'

assign schema to node 7d3561c9e46c41469b0060cf0d03a6cb is the uuid of the just created schema

curl 'https://demo.getmesh.io/api/v1/demo/schemas/7d3561c9e46c41469b0060cf0d03a6cb' -X POST

change schema for rootnode 3edde62224584deeaf7f4d3e68b442b8 is the uuid of the rootnode of the demo project

curl --request POST \
  --url https://demo.getmesh.io/api/v1/demo/schemas/3edde62224584deeaf7f4d3e68b442b8 \
  --header 'content-type: application/json' \
  --data '{
    "language": "en",
    "schema": {
        "name": "new_folder",
        "uuid": "7d3561c9e46c41469b0060cf0d03a6cb"
    }
}'

... http 200 response, but schema did not change

Expected behaviour and actual behaviour

schema should be changed

philippguertler commented 4 years ago

The schema of nodes cannot be changed currently. I'll move this issue to mesh-incubator as a feature request.

Jotschi commented 4 years ago

Relates to https://github.com/gentics/mesh-incubator/issues/240