System Information
- Strapi Version: 4.13.6
- Operating System: macos
- Database: sqlite
- Node Version: 20.13.1 lts/iron
- NPM Version: 10.5.2
- Yarn Version: NA
I have a component as a custom field in an API but the response on fetching all items using populate=*
does not contain __component
field.
On the other hand, a dynamic zone field in the same collection type does contain __component
field for all the items in the array.
Am I missing something or is this the expected response?
Schema example
...
attributes: {
single: {
"type": "component",
"repeatable": false,
"component": "media.image"
},
multiple: {
"type": "dynamiczone",
"components": [
"media.audio",
"media.image",
"media.video"
],
}
}
...
Response example
"single": {
"id": 14,
// why is __component field absent here
...
},
"multiple": [
{
"id": 2,
"__component": "media.video",
...
}
],