It should be possible to rename it using the json schema editor. Can you post the relevant part of your schema ?
Consider the following schema extract
"Seo" : {
"seo" : {
"type" : "Slices",
"fieldset" : "Slice zone",
"config" : {
"labels" : { },
"choices" : {
"seo" : {
"type" : "Slice",
"fieldset" : "Seo",
"description" : "seo information for this page",
"icon" : "local_offer",
"display" : "list",
"non-repeat" : {
"title" : {
"type" : "Text",
"config" : {
"label" : "Title",
"placeholder" : "description"
}
},
"description" : {
"type" : "Text",
"config" : {
"label" : "Description"
}
},
"indexable" : {
"type" : "Boolean",
"config" : {
"default_value" : false,
"label" : "indexable"
}
},
"image1" : {
"type" : "Image",
"config" : {
"constraint" : { },
"thumbnails" : [ ],
"label" : "image"
}
}
},
"repeat" : { }
}
}
}
}
},
This describes a Seo
tab (toplevel key in the custom type object) in a custom type which has a slice section with a single slice named Seo
(fieldset
in the schema). the slice_type
for the slice is seo
(object key in the choices
object)
It’s possible to change either the descriptive name of the slice (which is shown in prismic editor and is called fieldset
in the schema) or the name of slice_type
field by editing the choices key
directly.
A word of warning about the latter, you will loose the corresponding information in all documents of this type by doing this. Note that the slice_type
is used by slice-machine to determine the slice to be rendered, you should be very careful with renaming this as it will render with a different component.
What I usually do is I duplicate the key I want to change to it’s new key (preserving both types for a while), I edit all the documents of the corresponding type to duplicate the information then I remove the initial key.
yes it is every bit as painful as it sounds but in the absence of a write API or migration tool it’s not possible to automate it unless you can afford the Enterprise plan (which I can’t) in which case the import/export feature could be used to automate the change.