mirror of
https://github.com/strapi/strapi.git
synced 2025-08-15 20:27:23 +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,
|
...schemas,
|
||||||
[`${pascalCase(uniqueName)}`]: {
|
[`${pascalCase(uniqueName)}`]: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
...(requiredAttributes.length && { required: requiredAttributes }),
|
||||||
properties: cleanSchemaAttributes(attributes, {
|
properties: cleanSchemaAttributes(attributes, {
|
||||||
didAddStrapiComponentsToSchemas,
|
didAddStrapiComponentsToSchemas,
|
||||||
componentSchemaRefName: `#/components/schemas/${pascalCase(uniqueName)}`,
|
componentSchemaRefName: `#/components/schemas/${pascalCase(uniqueName)}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user