strapi / documentation

Strapi Documentation
https://docs.strapi.io
Other
1.03k stars 1.13k forks source link

[Bug]: Required fields do not work inside the JSON #2236

Open Justin-van-der-Velden opened 2 months ago

Justin-van-der-Velden commented 2 months ago

Link to the documentation page or resource

https://cms-strapi.amv.nl/api/swagger

Describe the bug

Within Strapi I have created several components which have some required properties. Somehow in the JSON there is no required prop inside the object. Inside the single type the component has the required prop but inside the component it self the properties don't have a required prop. Here are some example images:

Screenshot 2024-09-25 at 12 02 04 Screenshot 2024-09-25 at 12 01 34 Screenshot 2024-09-25 at 12 01 50

Additional context

As you can see from the images pageTitle and metaDescription are required the seoHead component. In the single type the whole seoHead component is wrapped inside a required array. But when I look inside the JSON from the component there are no required props at pageTitle and metaDescription.

Suggested improvements or fixes

When a field is set to required inside Strapi the documentation adds a required property to the JSON

Related issue(s)/PR(s)

No response