-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
What we’re doing currently returns quite a few errors from the validator (and crashes swagger-codegen etc.):
swagger2/src/Data/Swagger/Internal/Schema.hs
Lines 717 to 720 in f42c345
| nullarySchema :: Schema | |
| nullarySchema = mempty | |
| & type_ .~ SwaggerArray | |
| & items ?~ SwaggerItemsArray [] |
{
"items": [],
"type": "array"
}E.g. notice that "items" must be an object, and they’re an array above.
But this does not, and closely matches Aeson’s [] representation of () and mixed nullary/non-nullary constructors of a datatype:
{
"type": "array",
"items": {},
"maxItems": 0,
"example": []
}Metadata
Metadata
Assignees
Labels
No labels