mirror of
https://github.com/strapi/strapi.git
synced 2025-08-15 12:18:38 +00:00
Add required attributes to response
This commit is contained in:
parent
b71708a303
commit
d25e7468fb
@ -210,6 +210,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
|
||||
...schemas,
|
||||
[`${pascalCase(uniqueName)}`]: {
|
||||
type: 'object',
|
||||
...(requiredAttributes.length && { required: requiredAttributes }),
|
||||
properties: cleanSchemaAttributes(attributes, {
|
||||
didAddStrapiComponentsToSchemas,
|
||||
componentSchemaRefName: `#/components/schemas/${pascalCase(uniqueName)}`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user