-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
This appears to be a bug, but if not, then a work around be be appreciated:
posts Post[] |
prisma-json-schema-generator/src/tests/generator.test.ts
Lines 592 to 595 in d2d6fba
posts: { | |
items: { $ref: '#/definitions/Post' }, | |
type: 'array', | |
}, |
prisma-json-schema-generator/src/tests/generator.test.ts
Lines 619 to 620 in d2d6fba
required: ['email', 'bytes', 'keywords', 'biography'], | |
}, |
Surely Posts
should be a required field?
In my case, I have the following type:
/// An exam as designed by the examiners
model A {
config Config
}
{
"definitions": {
"A": {
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/B"
}
},
"required": []
},
"B": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"originalType": "TagConfig",
"items": {
"$ref": "#/definitions/TagConfig"
}
},
"total_time": {
"type": "integer",
"originalType": "Int",
},
"question_types": {
"type": "array",
"originalType": "QuestionConfig",
"items": {
"$ref": "#/definitions/QuestionConfig"
}
}
},
"required": [
"total_time"
]
}
}
}
Same goes for TagConfig
and QuestionConfig
- they are required, but do not get treated as such.
I am happy to contribute a fix, if this is unintentional
Metadata
Metadata
Assignees
Labels
No labels