-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Line 85 in 10f2c48
| type Definition struct { |
The Definition type does not allow supplying Items. This means that even with a custom SMD() override method, it's not possible to correctly document arrays of arrays where the inner item type is explained.
It seams reasonable to me to just drop the smd.Definition type and use smd.Property, or perhaps drop that as well and go for just having the smd.JSONSchema type.
In addition, the Items type (map[string]string) appears odd; the only valid value wold be to supply a key "$ref" and a value pointing to a Definition, so it would make more sense to let it be of type struct {Ref string `json:"$ref"`}, or indeed JSONSchema that already has a Ref field defined. The latter would also allow for inline schemas.