-
Couldn't load subscription status.
- Fork 39
Open
Description
What's happening?
I'm trying to use JSF (JSON Schema Faker) to generate test data from our API snapshots, but getting 'NoneType' object has no attribute 'name' errors on 13 schema files.
The schemas were generated using genson from actual API responses.
Example Schema
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"content": {
"type": "object",
"properties": {
"items": {
"type": "array"
}
},
"required": ["items"]
}
},
"required": ["content"]
}What I think is happening:
JSF seems to expect arrays to have an items definition:
"items": {
"type": "array",
"items": { "type": "string" } // This is missing
}But our genson-generated schemas just have:
"items": {
"type": "array" // No items definition
}Is this understanding correct? Should arrays always have items defined for JSF to work?
Metadata
Metadata
Assignees
Labels
No labels