The error itself is caused by the yup validator. As it doesn’t accept the index field from the Content-Type builder form. If you add a field manually to {model}.settings.json it will not use yup validator, this is why it works when you modify the file manually.
Yes, I can confirm this happened in v3.5.4 as well, I tried to create new project, rather than migrating from 3.0.0.beta16, everything works fine until I tried to change/add some field in collection.
{"error":{"contentType.attributes.chapter_number":["contentType.attributes.chapter_number field cannot have keys not specified in the object shape"]}}
This is happening to me too with version 3.6.2. Cannot edit my newly created content type without getting an error: [2021-07-23T01:41:29.987Z] debug PUT /content-type-builder/content-types/application::blogs.blogs (48 ms) 400
Usually it means you have manually modified the model structure with keys that the CTB (Content-Type builder) isn’t aware of. Not all settings in the model files are covered by the CTB.
I have the same Issue as above with a clean local strapi installation via npx of v3.6.8. I haven’t modified anything. Just installed it and started it. When trying to create a new collection, I receive a status code 400 - Bad Request. Any suggestions?
I worked further on the issue: The 400 - Bad Request error only occurs with certain names for fields. For me specifically it occurred when I named a collection by the name “Police” which is the german word for “Policy” haha. Strapi dosen’t like endpoint names like that. Is there some kind of blacklisting happening or what’s going on there? Or maybe it has to do with automatic plural generation? I really don’t know what’s going on. If I name my collection “Policen”, the german plural, it works fine.
EDIT: Ahhhhhh the payload of the respone contains the following:
“Content Type name Police cannot be pluralized. \nSuggestion: add Item after the name (e.g News → NewsItem).”
Then it really was the pluralization